Files
smom-dbis-138/terraform/modules/storage/main.tf
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

64 lines
2.0 KiB
HCL

# Storage Module for Azure
# Creates storage accounts for backups and shared storage
# Variables are defined in variables.tf
# Storage account for backups
resource "azurerm_storage_account" "backups" {
name = substr("${replace(lower(var.cluster_name), "-", "")}b${substr(var.environment, 0, 1)}${substr(md5(var.resource_group_name), 0, 6)}", 0, 24)
resource_group_name = var.resource_group_name
location = var.location
account_tier = "Standard"
account_replication_type = var.environment == "prod" ? "GRS" : "LRS"
min_tls_version = "TLS1_2"
# Enable blob versioning
blob_properties {
versioning_enabled = true
delete_retention_policy {
days = var.environment == "prod" ? 90 : 30
}
}
tags = merge(var.tags, {
Purpose = "backups"
})
}
# Container for chaindata backups
resource "azurerm_storage_container" "chaindata" {
name = "chaindata"
storage_account_name = azurerm_storage_account.backups.name
container_access_type = "private"
}
# Container for configuration backups
resource "azurerm_storage_container" "config" {
name = "config"
storage_account_name = azurerm_storage_account.backups.name
container_access_type = "private"
}
# Storage account for shared configuration (optional)
resource "azurerm_storage_account" "shared" {
name = substr("${replace(lower(var.cluster_name), "-", "")}s${substr(var.environment, 0, 1)}${substr(md5(var.resource_group_name), 0, 6)}", 0, 24)
resource_group_name = var.resource_group_name
location = var.location
account_tier = "Standard"
account_replication_type = "LRS"
min_tls_version = "TLS1_2"
tags = merge(var.tags, {
Purpose = "shared"
})
}
# File share for shared configuration
resource "azurerm_storage_share" "config" {
name = "config"
storage_account_name = azurerm_storage_account.shared.name
quota = 10
}
# Outputs are defined in outputs.tf