Skip to main content
Version: Next

Task 01: Configure Core Variables

Implementation Terraform

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


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
# Optional: Resource tags
tags = {
Customer = "Customer Name"
Environment = "Production"
ManagedBy = "Azure Local Cloud CI/CD"
CostCenter = "IT Infrastructure"
}

Variable Reference

VariableTypeDescriptionRequiredExample
customer_namestringCustomer short name"iic"
environmentstringEnvironment identifier (max 3 chars)"prd", "dev", "stg"
locationstringAzure region for resource deployment"eastus", "westus"
tenant_idstringCustomer Azure tenant ID (GUID)"12345678-1234-..."
azurelocal_cicd.runner_principal_idstringCI/CD runner service principal ID"87654321-4321-..."
azurelocal_group_object_idstringAzure Local Entra ID group object ID"abcdef12-3456-..."
tagsmap(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.


PreviousUpNext
Phase 01 - ConfigurationPhase 01 - ConfigurationTask 02 - Management Mode

Version Control

VersionDateAuthorChanges
1.0.02026-03-24Azure Local Cloudnology TeamInitial release