github.com/ves/terraform@v0.8.0-beta2/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 Access key should, ideally, be passed using the environment variable 16 `ARM_ACCESS_KEY` to follow this convention. 17 18 ## Example Usage 19 20 21 ``` 22 terraform remote config \ 23 -backend=azure \ 24 -backend-config="storage_account_name=terraform123abc" \ 25 -backend-config="container_name=terraform-state" \ 26 -backend-config="key=prod.terraform.tfstate" 27 ``` 28 29 ## Example Referencing 30 31 ```hcl 32 # setup remote state data source 33 data "terraform_remote_state" "foo" { 34 backend = "azure" 35 config { 36 storage_account_name = "terraform123abc" 37 container_name = "terraform-state" 38 key = "prod.terraform.tfstate" 39 } 40 } 41 ``` 42 43 ## Configuration variables 44 45 The following configuration options are supported: 46 47 * `storage_account_name` - (Required) The name of the storage account 48 * `container_name` - (Required) The name of the container to use within the storage account 49 * `key` - (Required) The key where to place/look for state file inside the container 50 * `access_key` / `ARM_ACCESS_KEY` - (Required) Storage account access key