The azure credential can be used to access Azure resources.

credential "azure" "azure_creds" {
tenant_id = "YourTenantID"
client_secret = "YourClientSecret"
client_id = "YourClientID"


tenant_idStringOptionalThe Microsoft Entra tenant (directory) ID.
client_idStringOptionalThe client (application) ID of an App Registration in the tenant
client_secretStringOptionalA client secret that was generated for the App Registration.
environmentStringOptionalThe Azure cloud where your resources exist - AzureCloud (default), AzureChinaCloud, or AzureUSGovernment.

All arguments are optional, and a azure credential with no arguments will behave the same as the default credential.

Attributes (Read-Only)

envMapA map of the resolved credential-related environment variables (AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_CLIENT_ID, AZURE_ENVIRONMENT)

Default Credential

The azure credential type includes an implicit, default credential ( that will be configured using the Azure environment variables:

credential "azure" "default" {
tenant_id = env("AZURE_TENANT_ID")
client_secret = env("AZURE_CLIENT_SECRET")
client_id = env("AZURE_CLIENT_ID")
environment = env("AZURE_ENVIRONMENT")