github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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` - (Required) Storage account access key