github.com/paybyphone/terraform@v0.9.5-0.20170613192930-9706042ddd51/website/docs/state/remote.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "State: Remote Storage"
     4  sidebar_current: "docs-state-remote"
     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 [Terraform Enterprise](https://www.hashicorp.com/products/terraform/),
    18  [Consul](https://www.consul.io), S3, and more.
    19  
    20  Remote state is a feature of [backends](/docs/backends). Configuring and
    21  using backends is easy and you can get started with remote state quickly.
    22  If you want to migrate back to using local state, backends make that
    23  easy as well.
    24  
    25  ## Delegation and Teamwork
    26  
    27  Remote state gives you more than just easier version control and
    28  safer storage. It also allows you to delegate the
    29  [outputs](/docs/configuration/outputs.html) to other teams. This allows
    30  your infrastructure to be more easily broken down into components that
    31  multiple teams can access.
    32  
    33  Put another way, remote state also allows teams to share infrastructure
    34  resources in a read-only way.
    35  
    36  For example, a core infrastructure team can handle building the core
    37  machines, networking, etc. and can expose some information to other
    38  teams to run their own infrastructure. As a more specific example with AWS:
    39  you can expose things such as VPC IDs, subnets, NAT instance IDs, etc. through
    40  remote state and have other Terraform states consume that.
    41  
    42  For example usage see the
    43  [terraform_remote_state](/docs/providers/terraform/d/remote_state.html) data source.
    44  
    45  ## Locking and Teamwork
    46  
    47  Terraform will automatically lock state depending on the
    48  [backend](/docs/backends) used. Please see the full page dedicated
    49  to [state locking](/docs/state/locking.html).
    50  
    51  [Terraform Enterprise by HashiCorp](https://www.hashicorp.com/products/terraform/) is a commercial offering
    52  that in addition to locking supports remote operations that allow you to
    53  safely queue Terraform operations in a central location. This enables
    54  teams to safely modify infrastructure concurrently.