github.com/pmcatominey/terraform@v0.7.0-rc2.0.20160708105029-1401a52a5cc5/website/source/docs/state/remote/index.html.md (about) 1 --- 2 layout: "remotestate" 3 page_title: "Remote State" 4 sidebar_current: "docs-state-remote_index" 5 description: |- 6 Terraform can store the state remotely, making it easier to version and work with in a team. 7 --- 8 9 # Remote State 10 11 By default, Terraform stores state locally in a file named "terraform.tfstate". 12 Because this file must exist, it makes working with Terraform in a team 13 complicated since it is a frequent source of merge conflicts. Remote state 14 helps alleviate these issues. 15 16 With remote state, Terraform stores the state in a remote store. Terraform 17 supports storing state in [Atlas](https://atlas.hashicorp.com), 18 [Consul](https://www.consul.io), S3, and more. 19 20 You can begin using remote state from the beginning with flags to the 21 [init](/docs/commands/init.html) command, or you can migrate an existing 22 local state to remote state using the 23 [remote config](/docs/commands/remote-config.html) command. You can also 24 use the remote config to disable remote state and move back to local 25 state. 26 27 ### Example Usage 28 29 ``` 30 $ terraform remote config -disable 31 ``` 32 33 ## Delegation and Teamwork 34 35 Remote state gives you more than just easier version control and 36 safer storage. It also allows you to delegate the 37 [outputs](/docs/configuration/outputs.html) to other teams. This allows 38 your infrastructure to be more easily broken down into components that 39 multiple teams can access. 40 41 Put another way, remote state also allows teams to share infrastructure 42 resources in a read-only way. 43 44 For example, a core infrastructure team can handle building the core 45 machines, networking, etc. and can expose some information to other 46 teams to run their own infrastructure. As a more specific example with AWS: 47 you can expose things such as VPC IDs, subnets, NAT instance IDs, etc. through 48 remote state and have other Terraform states consume that. 49 50 For example usage see the [terraform_remote_state](/docs/providers/terraform/r/remote_state.html) resource. 51 52 ## Locking and Teamwork 53 54 Remote state currently **does not** lock regions of your infrastructure 55 to allow parallel modification using Terraform. Therefore, you must still 56 collaborate with teammates to safely run Terraform. 57 58 [Atlas by HashiCorp](https://atlas.hashicorp.com) is a commercial offering 59 that does safely allow parallel Terraform runs and handles infrastructure 60 locking for you. 61 62 In the future, we'd like to extend the remote state system to allow some 63 minimal locking functionality, but it is a difficult problem without a 64 central system that we currently aren't focused on solving.