- 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
Terraform Infrastructure
Terraform configuration for The Order infrastructure on Azure.
Default Region: West Europe (westeurope)
Policy: No US Commercial or Government regions
Structure
versions.tf- Terraform and provider version constraintsmain.tf- Azure provider configurationvariables.tf- Variable definitionsoutputs.tf- Output definitionsresource-groups.tf- Resource group definitionsstorage.tf- Storage account definitionsmodules/- Reusable Terraform modules (to be created)AZURE_RESOURCE_PROVIDERS.md- Required resource providers documentationEXECUTION_GUIDE.md- Step-by-step execution guide
Prerequisites
Before using Terraform:
-
Run Azure setup scripts (from project root):
./infra/scripts/azure-setup.sh ./infra/scripts/azure-register-providers.sh -
Verify Azure CLI is installed and logged in:
az --version az account show -
Ensure required resource providers are registered: See
AZURE_RESOURCE_PROVIDERS.mdfor complete list.
Quick Start
# Navigate to Terraform directory
cd infra/terraform
# Initialize Terraform
terraform init
# Review what will be created
terraform plan
# Apply changes
terraform apply
Detailed Execution
See EXECUTION_GUIDE.md for comprehensive step-by-step instructions.
Environments
Environments are managed via the environment variable:
dev- Development environmentstage- Staging environmentprod- Production environment
# Deploy to specific environment
terraform plan -var="environment=dev"
terraform apply -var="environment=dev"
Resources
Currently Defined
- ✅ Resource Groups
- ✅ Storage Accounts (application data and Terraform state)
- ✅ Storage Containers
To Be Created
- ⏳ Azure Kubernetes Service (AKS) cluster
- ⏳ Azure Database for PostgreSQL
- ⏳ Azure Key Vault
- ⏳ Azure Container Registry (ACR)
- ⏳ Virtual Networks and Subnets
- ⏳ Application Gateway / Load Balancer
- ⏳ Azure Monitor and Log Analytics
Configuration
Default Region
Default region is West Europe (westeurope). US regions are not allowed.
To use a different region:
terraform plan -var="azure_region=northeurope"
Variables
Key variables (see variables.tf for complete list):
azure_region- Azure region (default:westeurope)environment- Environment name (dev,stage,prod)project_name- Project name (default:the-order)create_terraform_state_storage- Create state storage (default:true)
Secrets Management
Secrets are managed using:
- Azure Key Vault (to be configured)
- External Secrets Operator for Kubernetes (to be configured)
- SOPS for local development (optional)
State Management
Terraform state is stored in Azure Storage Account:
- First deployment creates storage account locally
- After creation, configure remote backend in
versions.tf - Re-initialize with
terraform init -migrate-state
See EXECUTION_GUIDE.md for detailed instructions.
Outputs
Key outputs (see outputs.tf for complete list):
resource_group_name- Main resource group namestorage_account_name- Application data storage accountazure_region- Azure region being used
View outputs:
terraform output
terraform output resource_group_name
Best Practices
- ✅ Always review
terraform planbefore applying - ✅ Use workspaces for multiple environments
- ✅ Never commit
.tfstatefiles - ✅ Use remote state backend
- ✅ Enable versioning on storage accounts
- ✅ Use
.tfvarsfiles for environment-specific values
Troubleshooting
Common issues and solutions:
Resource Provider Not Registered
./infra/scripts/azure-register-providers.sh
Quota Exceeded
./infra/scripts/azure-check-quotas.sh
# Request quota increase in Azure Portal
Invalid Region
- Ensure region doesn't start with
us - Default is
westeurope - See validation in
variables.tf
See EXECUTION_GUIDE.md for more troubleshooting tips.
Documentation
- Execution Guide:
EXECUTION_GUIDE.md- Step-by-step deployment instructions - Resource Providers:
AZURE_RESOURCE_PROVIDERS.md- Required providers and registration - Setup Scripts:
../scripts/README.md- Azure CLI setup scripts - Deployment Review:
../../docs/reports/DEPLOYMENT_READINESS_REVIEW.md- Overall deployment status
Next Steps
- ✅ Run setup scripts to register providers
- ✅ Initialize Terraform
- ✅ Create initial infrastructure (resource groups, storage)
- ⏳ Configure remote state backend
- ⏳ Add additional resources (AKS, PostgreSQL, Key Vault, etc.)
See EXECUTION_GUIDE.md for detailed step-by-step instructions.