Environment Variables

June 10, 2026 · View on GitHub

Comprehensive reference of environment variables used by azd.

For environment variables that accept a boolean, the values 1, t, T, TRUE, true, True are accepted as "true"; the values 0, f, F, FALSE, false, False are all accepted as "false".

Core Azure Variables

These variables are typically set by infrastructure provisioning outputs and stored in the .env file for each environment.

VariableDescription
AZURE_ENV_NAMEThe name of the active azd environment.
AZURE_LOCATIONThe default Azure region for resource deployment.
AZURE_SUBSCRIPTION_IDThe Azure subscription ID used for deployment.
AZURE_TENANT_IDThe Microsoft Entra tenant ID.
AZURE_PRINCIPAL_IDThe object ID of the signed-in principal.
AZURE_PRINCIPAL_TYPEThe type of the signed-in principal (e.g., User, ServicePrincipal).
AZURE_RESOURCE_GROUPThe default resource group name.
AZURE_CONTAINER_REGISTRY_ENDPOINTThe endpoint of the Azure Container Registry.
AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAINThe default domain of the Container Apps environment.
AZURE_APP_SERVICE_DASHBOARD_URIThe URI for the Aspire dashboard hosted on Azure App Service.
AZURE_AKS_CLUSTER_NAMEThe name of the Azure Kubernetes Service cluster.

Dev Center Variables

Variables for Azure Dev Center integration.

VariableDescription
AZURE_DEVCENTER_NAMEThe name of the Dev Center instance.
AZURE_DEVCENTER_PROJECTThe Dev Center project name.
AZURE_DEVCENTER_CATALOGThe catalog name within Dev Center.
AZURE_DEVCENTER_ENVIRONMENT_TYPEThe environment type in Dev Center (e.g., Dev, Test, Prod).
AZURE_DEVCENTER_ENVIRONMENT_DEFINITIONThe environment definition name.
AZURE_DEVCENTER_ENVIRONMENT_USERThe user identity for the Dev Center environment.

General Configuration

VariableDescription
AZD_CONFIG_DIRThe file path of the user-level configuration directory.
AZD_DEMO_MODEIf true, enables demo mode. This hides personal output, such as subscription IDs, from being displayed in output.
AZD_FORCE_TTYIf true, forces azd to write terminal-style output.
AZD_IN_CLOUDSHELLIf true, azd runs with Azure Cloud Shell specific behavior.
AZD_SKIP_UPDATE_CHECKIf true, skips the out-of-date update check output that is typically printed at the end of the command.
AZD_SKIP_FIRST_RUNIf true, skips the first-run tool setup experience and background tool update checks. Useful for CI/CD pipelines and automated environments.
AZD_CONTAINER_RUNTIMEThe container runtime to use (e.g., docker, podman).
AZD_ALLOW_NON_EMPTY_FOLDERIf set, allows azd init to run in a non-empty directory without prompting.
AZD_BUILDER_IMAGEThe builder docker image used to perform Dockerfile-less builds.
AZD_DEPLOY_CONCURRENCYMaximum number of services to deploy in parallel during azd deploy. Only takes effect when at least one service declares uses: targeting another service; without uses: edges, services deploy sequentially in alphabetical order for backward compatibility (see concurrency model). Parsed as a positive integer; clamped to a maximum of 64. When unset, concurrency is unlimited (bounded only by the number of services).
AZD_DEPLOY_TIMEOUTTimeout for deployment operations, parsed as an integer number of seconds (for example, 1200). Defaults to 1200 seconds (20 minutes).
AZD_PROVISION_CONCURRENCYMaximum number of infrastructure layers to provision in parallel during azd provision. Parsed as a positive integer; clamped to a maximum of 64. When unset, concurrency is unlimited (bounded only by the dependency graph).
AZD_DEPLOYMENT_ID_FILEAbsolute path of a file where azd writes ARM deployment IDs in NDJSON format (one JSON line per layer) during azd provision or azd up. The file is truncated at the start of each provisioning run, and each infrastructure layer appends one line as its ARM deployment starts. Each line has the shape {"deploymentId":"/subscriptions/.../deployments/<name>","layer":"<layer-name>"} — the layer field is empty for non-layered (single-module) provisioning. Consumers should tail/watch the file and parse each line independently; unknown fields must be ignored for forward compatibility. The path must be absolute (relative paths are ignored); the containing directory must already exist and be writable. Lines are only appended when an ARM deployment is actually started — runs short-circuited by the deployment-state cache or aborted by preflight do not produce output. A process-wide mutex serializes writes so each line is always complete. If the file cannot be written (for example, the parent directory does not exist, the path is not writable, or the path points to a directory rather than a file), provisioning continues and the failure is recorded via the standard log; that output is only visible when --debug or AZD_DEBUG_LOG is enabled. On Windows, consumers should use a file-watcher pattern that does not keep a read handle open, otherwise new appends may fail. Only Bicep deployments are supported.
AZD_UP_CONCURRENCYMaximum number of steps to run in parallel during azd up. Parsed as a positive integer; clamped to a maximum of 64. Falls back to AZD_DEPLOY_CONCURRENCY when unset. When both are unset, concurrency is unlimited.
AZD_DEPLOY_{SERVICE}_SLOT_NAMESets the App Service deployment slot target for a service. Replace {SERVICE} with the uppercase service name (hyphens become underscores). Set to production to deploy to the main app, or a slot name (e.g., staging). When slots exist and this is not set, --no-prompt mode fails with an error listing available targets.
AZD_DEPLOY_{SERVICE}_SKIP_STATUS_CHECKIf true, skips runtime deployment status tracking for the named Linux App Service after zip deploy. Useful when the target web app is intentionally stopped. Parsed as a boolean (true/false/1/0). {SERVICE} follows the same naming rules as AZD_DEPLOY_{SERVICE}_SLOT_NAME.

azd exec

The azd exec command runs commands and scripts with the active azd environment loaded into the child process. All environment variables from the .env file (including provisioning outputs) are injected automatically. Key Vault secret references (akvs:// and @Microsoft.KeyVault(SecretUri=...)) are resolved transparently before injection.

Execution Modes

azd exec selects an execution mode based on the arguments provided:

ModeTriggerExample
Script fileFirst argument is an existing fileazd exec ./setup.sh
Direct execMultiple arguments, no --shell flagazd exec python script.py
Shell inlineSingle argument, or --shell specifiedazd exec 'echo $AZURE_ENV_NAME'

Direct exec passes the exact argument vector to the child process without shell wrapping, which avoids quoting and escaping issues. Shell inline wraps the argument with the detected (or specified) shell's -c flag. Script file detects the shell from the file extension (.sh → bash, .ps1 → pwsh, .cmd/.bat → cmd).

Flags

FlagDescription
--shell, -sShell to use (bash, sh, zsh, pwsh, powershell, cmd). Auto-detected if not specified.
--interactive, -iRun in interactive mode (connects stdin to the child process).
--environment, -eThe azd environment to load.

Extension Variables

These variables are set and consumed by azd extension hosts (for example, IDE/editor integrations) and the azd extension framework. They are not intended to be configured as general CLI settings.

VariableDescription
AZD_NO_PROMPTIf true, disables interactive prompts. Typically set by extension hosts for non-interactive behavior.
AZD_ENVIRONMENTThe azd environment name provided by the extension host when invoking azd.
AZD_CWDThe working directory path used by the extension host when invoking azd.
AZD_SERVERThe address (e.g., localhost:12345) of the azd extension server for gRPC communication. Injected and consumed by the extension framework; not typically set by users directly.
AZD_ACCESS_TOKENA JWT used to authenticate gRPC calls to the azd extension server. Injected and consumed by the extension framework; not typically set by users directly.

Alpha Features

VariableDescription
AZD_ALPHA_ENABLE_ALLEnables all alpha features at once.
AZD_ALPHA_ENABLE_<name>Enables or disables an alpha feature. <name> is the upper-cased name of the feature, with dot . characters replaced by underscore _ characters.

External Authentication

Variables for External Authentication integration.

VariableDescription
AZD_AUTH_ENDPOINTThe External Authentication endpoint.
AZD_AUTH_KEYThe External Authentication shared key.
AZD_AUTH_CERTThe External Authentication client certificate, provided as a base64-encoded DER certificate string. When set, AZD_AUTH_ENDPOINT must use HTTPS.

Tool Configuration

For tools that are auto-acquired by azd, the following environment variables configure the path to a specific version of the tool installed on the machine.

VariableDescription
AZD_BICEP_TOOL_PATHThe Bicep tool override path. The direct path to bicep or bicep.exe.
AZD_GH_TOOL_PATHThe gh tool override path. The direct path to gh or gh.exe.
AZD_PACK_TOOL_PATHThe pack tool override path. The direct path to pack or pack.exe.
AZD_COPILOT_CLI_PATHThe Copilot CLI tool override path. When set, skips automatic download and uses the specified path.

Extension Configuration

VariableDescription
AZD_EXT_TIMEOUTTimeout for extension operations, parsed as an integer number of seconds (for example, 10). Defaults to 5 seconds; this is not a duration string, so values like 10m are not valid.
AZD_EXT_DEBUGIf true, enables debug output for extensions.
AZD_EXTENSION_CACHE_TTLTime-to-live for extension cache entries, parsed with Go's time.ParseDuration format (for example, 30m, 4h). Defaults to 4h.

Extension-Specific Variables

Note: These variables are defined and consumed by individual azd extensions. As the extension ecosystem grows, extension-specific variables may move to each extension's own documentation.

azure.ai.agents

VariableDescription
AZURE_AI_PROJECT_IDThe Microsoft Foundry project resource ID used by the azure.ai.agents extension.
FOUNDRY_PROJECT_ENDPOINTThe Microsoft Foundry project endpoint used by the azure.ai.agents extension. Read first from the active azd environment and, if not present, from the host shell environment as an endpoint-resolution fallback.
AZURE_AI_PROJECT_PRINCIPAL_IDThe principal ID associated with the Microsoft Foundry project identity.
AZURE_AI_ACCOUNT_NAMEThe Microsoft Foundry account name associated with the project.
AZURE_AI_PROJECT_NAMEThe Microsoft Foundry project name.
AZURE_AI_MODEL_DEPLOYMENT_NAMEThe default model deployment name used for generated agent code and templates.
AZURE_AI_PROJECT_ACR_CONNECTION_NAMEThe Azure Container Registry connection name used by the extension for hosted agents.
AI_PROJECT_DEPLOYMENTSJSON-encoded deployment metadata populated by the extension for agent workflows.
AI_PROJECT_DEPENDENT_RESOURCESJSON-encoded dependent resource metadata populated by the extension for agent workflows.
AZD_AGENT_SKIP_ACRIf true, signals the Bicep template to skip Azure Container Registry creation during provisioning. Automatically set by azd agent init for code-deploy scenarios (where no container image is built).
ENABLE_HOSTED_AGENTSIf set, indicates that hosted agents are enabled for the current azd environment.
ENABLE_CONTAINER_AGENTSIf set, indicates that container agents are enabled for the current azd environment.
AGENT_DEFINITION_PATHPath to an agent definition file for AI agent workflows.

UI Prompt Integration

VariableDescription
AZD_UI_PROMPT_ENDPOINTThe endpoint for external UI prompt service integration.
AZD_UI_PROMPT_KEYThe authentication key for the external UI prompt service.
AZD_UI_NO_PROMPT_DIALOGSet to any non-empty value to disable prompt dialog UI.

Telemetry & Tracing

VariableDescription
AZURE_DEV_COLLECT_TELEMETRYIf false, disables telemetry collection. Telemetry is enabled by default.
AZURE_DEV_USER_AGENTAppends a custom string to the User-Agent header sent with Azure requests.
TRACEPARENTThe W3C Trace Context traceparent header for distributed tracing. Automatically set by azd on extension processes for trace propagation. Not typically set by users.
TRACESTATEThe W3C Trace Context tracestate header for vendor-specific trace data. Automatically set by azd alongside TRACEPARENT. Not typically set by users.

CI/CD Variables

These variables are read by azd to detect and integrate with CI/CD systems.

Azure Pipelines

VariableDescription
TF_BUILDSet to True when running in Azure Pipelines.
BUILD_BUILDIDThe build ID in Azure Pipelines.
BUILD_BUILDNUMBERThe build number in Azure Pipelines.
SYSTEM_ACCESSTOKENThe access token for Azure Pipelines service connections.
SYSTEM_TEAMPROJECTIDThe Team Project ID in Azure DevOps.
SYSTEM_OIDCREQUESTURIThe OIDC request URI for federated identity in Azure Pipelines.
AZURESUBSCRIPTION_CLIENT_IDThe client ID from the Azure service connection.
AZURESUBSCRIPTION_TENANT_IDThe tenant ID from the Azure service connection.
AZURESUBSCRIPTION_SERVICE_CONNECTION_IDThe service connection ID in Azure DevOps.
AZURESUBSCRIPTION_SUBSCRIPTION_IDThe subscription ID from the Azure service connection.

GitHub Actions

VariableDescription
GITHUB_ACTIONSSet to true when running in GitHub Actions.
GITHUB_RUN_IDThe unique ID of the current GitHub Actions workflow run.
AZURE_OIDC_TOKENAn OIDC token for Azure federated credential authentication.
AZURE_OIDC_REQUEST_TOKENThe request token for Azure OIDC in GitHub Actions.
AZURE_OIDC_REQUEST_URLThe request URL for Azure OIDC in GitHub Actions.
ACTIONS_ID_TOKEN_REQUEST_TOKENThe GitHub Actions OIDC request token.
ACTIONS_ID_TOKEN_REQUEST_URLThe GitHub Actions OIDC request URL.

GitHub Codespaces

VariableDescription
CODESPACESSet to true when running in GitHub Codespaces. Used by azd for environment detection and tracing.

General CI

VariableDescription
CISet to true when running in a generic CI environment.

Terraform Provider Variables

These variables are used by the Terraform provider integration to authenticate with Azure.

VariableDescription
ARM_TENANT_IDThe Azure tenant ID for Terraform Azure provider.
ARM_CLIENT_IDThe Azure client ID for Terraform Azure provider.
ARM_CLIENT_SECRETThe Azure client secret for Terraform Azure provider.
ARM_SUBSCRIPTION_IDThe Azure subscription ID for Terraform Azure provider.

Console & Terminal

VariableDescription
NO_COLORIf set, disables color output. See no-color.org.
FORCE_COLORSet to 1 to force color output regardless of terminal detection. Only the exact value 1 is recognized.
COLUMNSOverrides the detected terminal width (in columns).
TERMThe terminal type. Used to detect terminal capabilities.
BROWSERThe browser command to use for opening URLs (e.g., during azd auth login).

Debug Variables

Warning: Debug variables are unsupported and may change or be removed without notice.

VariableDescription
AZD_DEBUGIf true, enables debug mode.
AZD_DEBUG_LOGIf true, enables debug-level logging.
AZD_DEBUG_TELEMETRYIf true, enables debug-level telemetry output.
AZD_DEBUG_MSAL_CACHEIf true, logs MSAL cache metadata before and after login and around the first silent token acquisitions, including account identifiers and usernames, while hashing cache keys and token secrets.
AZD_DEBUG_LOGIN_FORCE_SUBSCRIPTION_REFRESHIf true, forces a refresh of the subscription list on login.
AZD_DEBUG_SYNTHETIC_SUBSCRIPTIONIf set, provides a synthetic subscription for testing.
AZD_DEBUG_NO_ALPHA_WARNINGSIf true, suppresses alpha feature warnings.
AZD_DEBUG_PROVISION_PROGRESS_DISABLEIf true, disables provision progress display. Read by both the Bicep provider and the Dev Center provisioner.
AZD_DEBUG_DOTNET_APPHOST_USE_FIXED_MANIFESTIf true, uses a fixed manifest for Aspire app host.
AZD_DEBUG_DOTNET_APPHOST_IGNORE_UNSUPPORTED_RESOURCESIf true, ignores unsupported resources in Aspire app host.
AZD_DEBUG_SERVER_DEBUG_ENDPOINTSIf true, enables debug endpoints in server mode.
AZD_DEBUG_EXPERIMENTATION_TAS_ENDPOINTOverrides the experimentation TAS endpoint URL.
AZD_SUBSCRIPTIONS_FETCH_MAX_CONCURRENCYLimits the maximum concurrency when fetching subscriptions.
DEPLOYMENT_STACKS_BYPASS_STACK_OUT_OF_SYNC_ERRORIf true, bypasses Deployment Stacks out-of-sync errors.

Test Variables

Warning: Test variables are used by the azd test suite only and are not intended for end users.

Tip: Instead of setting environment variables for every session, you can persist test defaults in your user-level azd config. These config keys act as fallbacks when the corresponding environment variable is not set:

azd config set defaults.test.subscription <SUBSCRIPTION_ID>
azd config set defaults.test.tenant <TENANT_ID>
azd config set defaults.test.location <LOCATION>

Resolution order: environment variable → defaults.test.*defaults.* (global default). Note: AZD_TEST_TENANT_ID only falls back to defaults.test.tenant (no defaults.tenant global fallback). Config fallbacks are only consulted when the CI environment variable is unset.

VariableDescriptionConfig Fallback
AZD_TEST_CLIENT_IDThe client ID for test authentication.
AZD_TEST_TENANT_IDThe tenant ID for test authentication.defaults.test.tenant
AZD_TEST_AZURE_SUBSCRIPTION_IDThe Azure subscription ID for tests.defaults.test.subscription
AZD_TEST_AZURE_LOCATIONThe Azure location for tests.defaults.test.location
AZD_TEST_CLI_VERSIONOverrides the CLI version reported during tests.
AZD_TEST_FIXED_CLOCK_UNIX_TIMESets a fixed clock time (Unix epoch) for deterministic tests.
AZD_TEST_HTTPS_PROXYThe HTTPS proxy URL for tests.
AZD_TEST_DOCKER_E2EIf true, enables Docker-based end-to-end tests.
AZD_FUNC_TESTIf true, indicates functional test mode.
UPDATE_SNAPSHOTSIf set, updates test snapshots when running snapshot-based tests.
AZURE_RECORD_MODESets the record mode for Azure SDK test recordings. Valid values: live, playback, record.
CLI_TEST_AZD_PATHOverrides the azd binary path used in CLI tests.
CLI_TEST_SKIP_BUILDIf true, skips building azd before running tests.