- 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
93 lines
2.8 KiB
HCL
93 lines
2.8 KiB
HCL
# Local values for naming conventions and common configurations
|
|
# Follows standard naming pattern: {provider}-{region}-{resource}-{env}-{purpose}
|
|
|
|
locals {
|
|
# Provider identifier
|
|
provider = "az"
|
|
|
|
# Region abbreviation mapping
|
|
region_abbrev = {
|
|
westeurope = "we"
|
|
northeurope = "ne"
|
|
uksouth = "uk"
|
|
switzerlandnorth = "ch"
|
|
norwayeast = "no"
|
|
francecentral = "fr"
|
|
germanywestcentral = "de"
|
|
}
|
|
|
|
# Current region abbreviation
|
|
region_short = lookup(local.region_abbrev, var.azure_region, "we")
|
|
|
|
# Environment abbreviations
|
|
env_abbrev = {
|
|
dev = "dev"
|
|
stage = "stg"
|
|
prod = "prd"
|
|
mgmt = "mgmt"
|
|
}
|
|
|
|
# Current environment abbreviation
|
|
env_short = lookup(local.env_abbrev, var.environment, "dev")
|
|
|
|
# Project name (shortened for resource names)
|
|
project_short = "ord"
|
|
|
|
# Naming functions
|
|
# Format: {provider}-{region}-{resource}-{env}-{purpose}
|
|
name_prefix = "${local.provider}-${local.region_short}"
|
|
|
|
# Resource Group naming
|
|
# Pattern: az-we-rg-dev-main
|
|
rg_name = "${local.name_prefix}-rg-${local.env_short}-main"
|
|
rg_state_name = "${local.name_prefix}-rg-${local.env_short}-state"
|
|
|
|
# Storage Account naming (alphanumeric only, max 24 chars)
|
|
# Pattern: azwesadevdata (az + we + sa + dev + data)
|
|
sa_data_name = "${local.provider}${local.region_short}sa${local.env_short}data"
|
|
sa_state_name = "${local.provider}${local.region_short}sa${local.env_short}state"
|
|
|
|
# Key Vault naming (alphanumeric and hyphens, max 24 chars)
|
|
# Pattern: az-we-kv-dev-main
|
|
kv_name = "${local.name_prefix}-kv-${local.env_short}-main"
|
|
|
|
# AKS Cluster naming (max 63 chars)
|
|
# Pattern: az-we-aks-dev-main
|
|
aks_name = "${local.name_prefix}-aks-${local.env_short}-main"
|
|
|
|
# Container Registry naming (alphanumeric only, max 50 chars)
|
|
# Pattern: azweacrdev (az + we + acr + dev)
|
|
acr_name = "${local.provider}${local.region_short}acr${local.env_short}"
|
|
|
|
# PostgreSQL Server naming (max 63 chars)
|
|
# Pattern: az-we-psql-dev-main
|
|
psql_name = "${local.name_prefix}-psql-${local.env_short}-main"
|
|
|
|
# Database naming (max 63 chars)
|
|
# Pattern: az-we-db-dev-main
|
|
db_name = "${local.name_prefix}-db-${local.env_short}-main"
|
|
|
|
# Virtual Network naming (max 64 chars)
|
|
# Pattern: az-we-vnet-dev-main
|
|
vnet_name = "${local.name_prefix}-vnet-${local.env_short}-main"
|
|
|
|
# Application Insights naming (max 255 chars)
|
|
# Pattern: az-we-appi-dev-main
|
|
appi_name = "${local.name_prefix}-appi-${local.env_short}-main"
|
|
|
|
# Log Analytics Workspace naming (max 63 chars)
|
|
# Pattern: az-we-law-dev-main
|
|
law_name = "${local.name_prefix}-law-${local.env_short}-main"
|
|
|
|
# Common tags
|
|
common_tags = {
|
|
Environment = var.environment
|
|
Project = var.project_name
|
|
Region = var.azure_region
|
|
ManagedBy = "Terraform"
|
|
CostCenter = "engineering"
|
|
Owner = "platform-team"
|
|
}
|
|
}
|
|
|