Files
the_order/infra/terraform/storage.tf
defiQUG 8649ad4124 feat: implement naming convention, deployment automation, and infrastructure updates
- Add comprehensive naming convention (provider-region-resource-env-purpose)
- Implement Terraform locals for centralized naming
- Update all Terraform resources to use new naming convention
- Create deployment automation framework (18 phase scripts)
- Add Azure setup scripts (provider registration, quota checks)
- Update deployment scripts config with naming functions
- Create complete deployment documentation (guide, steps, quick reference)
- Add frontend portal implementations (public and internal)
- Add UI component library (18 components)
- Enhance Entra VerifiedID integration with file utilities
- Add API client package for all services
- Create comprehensive documentation (naming, deployment, next steps)

Infrastructure:
- Resource groups, storage accounts with new naming
- Terraform configuration updates
- Outputs with naming convention examples

Deployment:
- Automated deployment scripts for all 15 phases
- State management and logging
- Error handling and validation

Documentation:
- Naming convention guide and implementation summary
- Complete deployment guide (296 steps)
- Next steps and quick start guides
- Azure prerequisites and setup completion docs

Note: ESLint warnings present - will be addressed in follow-up commit
2025-11-12 08:22:51 -08:00

61 lines
2.0 KiB
HCL

# Azure Storage Account for Terraform State Backend
# This should be created first, then uncomment the backend block in versions.tf
# Naming: azwesadevstate (provider+region+sa+env+purpose, alphanumeric only, max 24 chars)
resource "azurerm_storage_account" "terraform_state" {
count = var.create_terraform_state_storage ? 1 : 0
name = local.sa_state_name
resource_group_name = azurerm_resource_group.terraform_state[0].name
location = var.azure_region
account_tier = "Standard"
account_replication_type = "LRS"
min_tls_version = "TLS1_2"
# Enable blob versioning and soft delete for state protection
blob_properties {
versioning_enabled = true
delete_retention_policy {
days = 30
}
}
tags = merge(local.common_tags, {
Purpose = "TerraformState"
})
}
resource "azurerm_storage_container" "terraform_state" {
count = var.create_terraform_state_storage ? 1 : 0
name = "terraform-state"
storage_account_name = azurerm_storage_account.terraform_state[0].name
container_access_type = "private"
}
# Storage Account for application data (object storage)
# Naming: azwesadevdata (provider+region+sa+env+purpose, alphanumeric only, max 24 chars)
resource "azurerm_storage_account" "app_data" {
name = local.sa_data_name
resource_group_name = azurerm_resource_group.main.name
location = var.azure_region
account_tier = "Standard"
account_replication_type = var.environment == "prod" ? "GRS" : "LRS"
min_tls_version = "TLS1_2"
allow_blob_public_access = false
# Enable blob versioning for data protection
blob_properties {
versioning_enabled = true
delete_retention_policy {
days = var.environment == "prod" ? 90 : 30
}
container_delete_retention_policy {
days = var.environment == "prod" ? 90 : 30
}
}
tags = merge(local.common_tags, {
Purpose = "ApplicationData"
})
}