- 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
3.9 KiB
3.9 KiB
Naming Convention Implementation Summary
Last Updated: 2025-01-27
Status: ✅ Complete
Overview
The standardized naming convention has been fully implemented across The Order project. All Azure resources now follow the pattern:
{provider}-{region}-{resource}-{env}-{purpose}
Implementation Status
✅ Completed
-
Naming Convention Document (
docs/governance/NAMING_CONVENTION.md)- Comprehensive naming rules and patterns
- Region abbreviations
- Resource type abbreviations
- Environment abbreviations
- Purpose identifiers
- Examples for all resource types
-
Terraform Implementation
- ✅ Created
locals.tfwith centralized naming functions - ✅ Updated
resource-groups.tfto use new naming - ✅ Updated
storage.tfto use new naming (with special rules) - ✅ Updated
outputs.tfwith naming convention outputs - ✅ Updated
variables.tfwith region validation - ✅ Updated
versions.tfbackend comments
- ✅ Created
-
Deployment Scripts
- ✅ Updated
scripts/deploy/config.shwith naming functions - ✅ Added region abbreviation mapping
- ✅ Added environment abbreviation mapping
- ✅ All resource names now use new convention
- ✅ Updated
-
Documentation
- ✅ Updated deployment guide with naming convention reference
- ✅ Created naming validation document
- ✅ All examples updated
Naming Examples
Resource Groups
- Old:
the-order-dev-rg - New:
az-we-rg-dev-main
Storage Accounts
- Old:
theorderdevdata - New:
azwesadevdata(alphanumeric only, max 24 chars)
Key Vaults
- Old:
the-order-dev-kv - New:
az-we-kv-dev-main(max 24 chars)
AKS Clusters
- Old:
the-order-dev-aks - New:
az-we-aks-dev-main
Container Registries
- Old:
theorderacr - New:
azweacrdev(alphanumeric only, max 50 chars)
Key Features
Centralized Naming
All naming logic is centralized in infra/terraform/locals.tf:
locals {
provider = "az"
region_short = "we" # westeurope
env_short = "dev"
rg_name = "${local.provider}-${local.region_short}-rg-${local.env_short}-main"
sa_data_name = "${local.provider}${local.region_short}sa${local.env_short}data"
# ... etc
}
Automatic Abbreviations
Region and environment abbreviations are automatically calculated:
westeurope→wenortheurope→neuksouth→ukdev→devstage→stgprod→prd
Validation
Terraform variables include validation:
validation {
condition = contains([
"westeurope", "northeurope", "uksouth", ...
], var.azure_region)
error_message = "Region must be one of the supported non-US regions."
}
Usage
In Terraform
resource "azurerm_resource_group" "main" {
name = local.rg_name # az-we-rg-dev-main
location = var.azure_region
}
In Deployment Scripts
# Automatically calculated from environment variables
readonly RESOURCE_GROUP_NAME="${NAME_PREFIX}-rg-${ENV_SHORT}-main"
# Result: az-we-rg-dev-main
Benefits
- Consistency: All resources follow the same pattern
- Clarity: Names are self-documenting
- Compliance: Meets Azure naming requirements
- Maintainability: Centralized naming logic
- Scalability: Easy to add new resources
- Automation: Scripts automatically generate correct names
Next Steps
When adding new resources:
- Add naming function to
locals.tf - Use the local value in resource definition
- Update documentation if needed
- Test with Terraform plan
References
Status: ✅ Implementation complete and ready for use