github.com/rvichery/terraform@v0.11.10/website/docs/backends/types/azurerm.html.md (about) 1 --- 2 layout: "backend-types" 3 page_title: "Backend Type: azurerm" 4 sidebar_current: "docs-backends-types-standard-azurerm" 5 description: |- 6 Terraform can store state remotely in Azure Blob Storage. 7 8 --- 9 10 # azurerm (formerly azure) 11 12 **Kind: Standard (with state locking)** 13 14 Stores the state as a given key in a given blob container on [Microsoft Azure Storage](https://azure.microsoft.com/en-us/documentation/articles/storage-introduction/). This backend also supports state locking and consistency checking via native capabilities of Microsoft Azure Storage. 15 16 ## Example Configuration 17 18 ```hcl 19 terraform { 20 backend "azurerm" { 21 storage_account_name = "abcd1234" 22 container_name = "tfstate" 23 key = "prod.terraform.tfstate" 24 } 25 } 26 ``` 27 28 Note that for the access credentials we recommend using a 29 [partial configuration](/docs/backends/config.html). 30 31 ## Example Referencing 32 33 ```hcl 34 data "terraform_remote_state" "foo" { 35 backend = "azurerm" 36 config { 37 storage_account_name = "terraform123abc" 38 container_name = "terraform-state" 39 key = "prod.terraform.tfstate" 40 } 41 } 42 ``` 43 44 ## Configuration variables 45 46 The following configuration options are supported: 47 48 * `storage_account_name` - (Required) The name of the storage account 49 * `container_name` - (Required) The name of the container to use within the storage account 50 * `key` - (Required) The key where to place/look for state file inside the container 51 * `access_key` / `ARM_ACCESS_KEY` - (Optional) Storage account access key 52 * `environment` / `ARM_ENVIRONMENT` - (Optional) The cloud environment to use. Supported values are: 53 * `public` (default) 54 * `usgovernment` 55 * `german` 56 * `china` 57 58 The following configuration options must be supplied if `access_key` is not. 59 60 * `resource_group_name` - The resource group which contains the storage account. 61 * `arm_subscription_id` / `ARM_SUBSCRIPTION_ID` - The Azure Subscription ID. 62 * `arm_client_id` / `ARM_CLIENT_ID` - The Azure Client ID. 63 * `arm_client_secret` / `ARM_CLIENT_SECRET` - The Azure Client Secret. 64 * `arm_tenant_id` / `ARM_TENANT_ID` - The Azure Tenant ID.