Skip to main content
Version: Next

Task 05: Configure Environment Variables

Runbook GitHub GitLab Azure DevOps

DOCUMENT CATEGORY: Runbook Step SCOPE: CI/CD pipeline variable configuration PURPOSE: Configure environment variables for Azure authentication MASTER REFERENCE: See platform-specific docs below

Status: Active Applies To: All Azure Local deployments Last Updated: 2026-03-19


Objective

Configure CI/CD pipeline environment variables for each target Azure subscription.


Prerequisites

  • Environments created (Task 04)
  • Bootstrap values from Task 01 (ARM_CLIENT_ID, ARM_CLIENT_SECRET)

Variables from variables.yml

VariableConfig PathExample
Tenant IDazure.tenant_idxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Subscription IDazure.subscription.idxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SPN Client IDidentity.service_principal.app_idxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SPN Client Secretkeyvault://<vault>/automation-spn-secret(Key Vault reference)

Required Variables

Configure the following variables for each target Azure subscription:

VariableDescriptionSensitivity
ARM_TENANT_IDEntra ID tenant IDMasked
ARM_SUBSCRIPTION_IDAzure subscription IDMasked
ARM_CLIENT_IDazurelocal-cicd App Registration ID (from Task 01)Masked
ARM_CLIENT_SECRETazurelocal-cicd App Registration secret (from Task 01)Secret

Procedure

Configure Repository Secrets

  1. Navigate to your repository → SettingsSecrets and variablesActions
  2. Click New repository secret for each variable:
Secret NameValue
ARM_TENANT_IDEntra ID tenant ID
ARM_SUBSCRIPTION_IDAzure subscription ID
ARM_CLIENT_IDApp Registration client ID
ARM_CLIENT_SECRETApp Registration client secret

For multi-environment deployments, use environment-scoped secrets:

  1. Go to SettingsEnvironments → select environment (e.g. azr-prod-us)
  2. Under Environment secrets, click Add secret
  3. Add environment-specific values for ARM_SUBSCRIPTION_ID (and others if they differ per environment)

Tip: Repository-level secrets apply to all environments. Use environment secrets to override per environment.


Verification

  • All required variables configured per environment
  • Sensitive values are masked/secret
  • Variables scoped to correct environments
  • Test pipeline can authenticate to Azure

Next Steps

Deploy Runners


References