Task 01: Configure Core Variables
DOCUMENT CATEGORY: Task SCOPE: Core Terraform variable configuration PURPOSE: Define customer and CI/CD integration variables MASTER REFERENCE: azurelocal-toolkit Variables
Status: Active Last Updated: 2026-02-07
Objective
Configure the core Terraform variables required for all CI/CD deployments, including customer details, environment settings, and CI/CD Infrastructure integration.
Prerequisites
- Customer short name (from project naming convention)
- Azure tenant ID
- Azure subscription ID
- CI/CD Infrastructure runner principal ID (from Part 1: CI/CD Infrastructure)
- Azure Local Entra ID group object ID (from Part 1: CI/CD Infrastructure)
Procedure
1. Open Terraform Variables File
Navigate to your source control project and open the Terraform variables file:
# Typically located at:
terraform/environments/<environment>/terraform.tfvars
# or
terraform.tfvars
2. Configure Customer Variables
Add the core customer variables:
# Customer Configuration
customer_name = "iic" # Customer short name (lowercase, hyphens)
environment = "prd" # Environment: prd, dev, stg (max 3 chars)
location = "eastus" # Azure region (eastus, westus, centralus, etc.)
tenant_id = "12345678-1234-1234-1234-123456789012" # Customer Azure tenant ID
3. Configure CI/CD Infrastructure Integration
Add the CI/CD Infrastructure variables from Part 2:
# CI/CD Infrastructure (from Part 1)
azurelocal_cicd = {
runner_principal_id = "87654321-4321-4321-4321-210987654321" # CI/CD runner service principal
}
# Azure Local Entra ID Group (from Part 1)
azurelocal_group_object_id = "abcdef12-3456-7890-abcd-ef1234567890" # Azure Local management group
4. Add Optional Tags (Recommended)
# Optional: Resource tags
tags = {
Customer = "Customer Name"
Environment = "Production"
ManagedBy = "Azure Local Cloud CI/CD"
CostCenter = "IT Infrastructure"
}
Variable Reference
| Variable | Type | Description | Required | Example |
|---|---|---|---|---|
customer_name | string | Customer short name | ✅ | "iic" |
environment | string | Environment identifier (max 3 chars) | ✅ | "prd", "dev", "stg" |
location | string | Azure region for resource deployment | ✅ | "eastus", "westus" |
tenant_id | string | Customer Azure tenant ID (GUID) | ✅ | "12345678-1234-..." |
azurelocal_cicd.runner_principal_id | string | CI/CD runner service principal ID | ✅ | "87654321-4321-..." |
azurelocal_group_object_id | string | Azure Local Entra ID group object ID | ✅ | "abcdef12-3456-..." |
tags | map(string) | Optional resource tags | ❌ | { Customer = "..." } |
Validation
After configuration, verify:
- Customer name follows naming convention
- Environment code is valid (3 characters maximum)
- Azure region is correct and available
- Tenant ID is correct customer tenant GUID
- Runner principal ID matches CI/CD pipeline service principal from Part 1
- Azure Local group object ID matches Entra ID group from Part 1
- No syntax errors in HCL configuration
Example Complete Configuration
# terraform.tfvars
# Customer Configuration
customer_name = "acme"
environment = "prd"
location = "eastus"
tenant_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
# CI/CD Infrastructure
azurelocal_cicd = {
runner_principal_id = "11223344-5566-7788-99aa-bbccddeeff00"
}
# Azure Local Entra ID Group
azurelocal_group_object_id = "ffeeddcc-bbaa-9988-7766-554433221100"
# Optional Tags
tags = {
Customer = "Acme Corporation"
Environment = "Production"
ManagedBy = "Azure Local CI/CD"
CostCenter = "IT-Infrastructure"
Project = "Azure Local Deployment"
}
Troubleshooting
Issue: Invalid customer_name format
Solution: Customer name must be lowercase with hyphens only (e.g., acme, global-tech)
Issue: Invalid environment value
Solution: Environment must be 3 characters or less: prd, dev, stg, qa, etc.
Issue: Azure region not available
Solution: Verify region name with az account list-locations -o table
Issue: Cannot find runner principal ID Solution: Check Part 1 CI/CD Infrastructure deployment outputs or CI/CD pipeline variables
Next Steps
Proceed to Task 02 - Configure Management Mode to define network configuration.
Navigation
| Previous | Up | Next |
|---|---|---|
| Phase 01 - Configuration | Phase 01 - Configuration | Task 02 - Management Mode |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2026-03-24 | Azure Local Cloudnology Team | Initial release |