github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/state/remote/azure.html.md (about) 1 --- 2 layout: "remotestate" 3 page_title: "Remote State Backend: azure" 4 sidebar_current: "docs-state-remote-azure" 5 description: |- 6 Terraform can store the state remotely, making it easier to version and work with in a team. 7 --- 8 9 # azure 10 11 Stores the state as a given key in a given bucket on [Microsoft Azure Storage](https://azure.microsoft.com/en-us/documentation/articles/storage-introduction/). 12 13 -> **Note:** Passing credentials directly via config options will 14 make them included in cleartext inside the persisted state. 15 Use of environment variables or config file is recommended. 16 17 ## Example Usage 18 19 ``` 20 terraform remote config \ 21 -backend=azure \ 22 -backend-config="storage_account_name=terraform123abc" \ 23 -backend-config="container_name=terraform-state" \ 24 -backend-config="key=prod.terraform.tfstate" 25 ``` 26 27 ## Example Referencing 28 29 ```hcl 30 # setup remote state data source 31 data "terraform_remote_state" "foo" { 32 backend = "azure" 33 config { 34 storage_account_name = "terraform123abc" 35 container_name = "terraform-state" 36 key = "prod.terraform.tfstate" 37 } 38 } 39 ``` 40 41 ## Configuration variables 42 43 The following configuration options are supported: 44 45 * `storage_account_name` - (Required) The name of the storage account 46 * `container_name` - (Required) The name of the container to use within the storage account 47 * `key` - (Required) The key where to place/look for state file inside the container 48 * `access_key` / `ARM_ACCESS_KEY` - (Optional) Storage account access key 49 * `resource_group_name` - (Optional) The name of the resource group for the storage account. This is required when using the ARM credentials described below. 50 * `arm_subscription_id` - (Optional) The subscription ID to use. It can also 51 be sourced from the `ARM_SUBSCRIPTION_ID` environment variable. 52 * `arm_client_id` - (Optional) The client ID to use. It can also be sourced from 53 the `ARM_CLIENT_ID` environment variable. 54 * `arm_client_secret` - (Optional) The client secret to use. It can also be sourced from 55 the `ARM_CLIENT_SECRET` environment variable. 56 * `arm_tenant_id` - (Optional) The tenant ID to use. It can also be sourced from the 57 `ARM_TENANT_ID` environment variable.