terraform
Last updated
Last updated
Azure (i.e. Azure Resource Manager)
the 'old' Azure Service Management (ASM) provider
Azure Active Directory (AAD)
Azure Stack (on-premises)
https://www.terraform.io/docs/providers/azurerm/index.html#authenticating-to-azure
AZ CLI - if environment has az
CLI installed, re-use existing session
Azure Managed Identity (on Azure compute resource)
Azure Service Principals (with client secrets or X.509 certs)
"azurerm"
Provider (Azure Resource Manager)https://www.terraform.io/docs/providers/azurerm/
http://aka.ms/terraform
"azure_ad"
Provider (Azure Resource Manager)https://www.terraform.io/docs/providers/azuread/index.html
ARM_ENVIRONMENT
- public
, usgovernment
, german
, china
ARM_SUBSCRIPTION_ID
- Azure subscription ID
ARM_TENANT_ID
- Azure AD tenant ID for service principal
ARM_USE_MSI
- Use Managed Service Identity
ARM_CLIENT_ID
- Service principal ID
ARM_CLIENT_SECRET
- Service principal secret
"azurerm"
backendStores state in a blob, in a container, in an Azure storage account.
Inherit authN info from outer environment, such as az
CLI or service principal
use_msi
: Managed identity within Azure Compute
access_key
: The storage account's access key
sas_token
: A 'shared access signature' token
Alternatively, Azure CosmosDB provides an etcd protocol head.
Many data sources, including
azurerm
"azurerm_subscriptions"
: information about all the Subscriptions currently available
"azurerm_subscription"
: information about an existing Subscription.
KeyVault, Networking, API Management, Compute, ...
azuread
Users, Groups, Roles, ...
http://aka.ms/tfmodules
"azurerm_template_deployment"
: use ARM templates within TerraformExample: https://github.com/chgeuer/azure-snippets/blob/master/logic-app-reading-xml/terraform/modules/logicapp/main.tf
Private preview supporting three providers: Kubernetes, Cloudflare and Datadog
https://azure.microsoft.com/en-us/blog/introducing-the-azure-terraform-resource-provider/
TF installed in the Azure Cloud Shell shell.azure.com
Terraform
JSON w/ comments
HCL
Variables
Local variables
Resources
Resources
Modules
Explicit
Automatic
Refer by reference or resourceId
Refer by resource or data source