Closed julianpistorius closed 1 year ago
More info about Terraform Cloud:
Currently when you apply the Terraform configuration it generates a 'state file', a giant JSON file with the last known state of the infrastructure:
You're not supposed to commit this file to Git, but you do need to share this file with other members of the team who are collaborating on the same infrastructure. Remote state management is a way to achieve this easily and securely.
From the blog post linked above:
Remote State Management
State files in Terraform capture the existing state of provisioned infrastructure for a given workspace. These files are used by Terraform to ensure that it properly creates or destroys infrastructure with respect to infrastructure that already exists.
For existing users of Terraform Open Source, state files are stored on machines locally by default. That means collaborating on Infrastructure with a team member involves carefully sharing that file and ensuring that team members update each other when they’ve made changes. That motion gets more complex as both number of state files/workspaces and number of collaborators grow.
Today we’re introducing remote state management with Terraform Cloud. This feature allows users to use Terraform Cloud as a remote backend to store and manage state files. With Terraform Cloud remote state management, individual users no longer need to maintain local state files and teams no longer need to carefully share or manage those files. Terraform Cloud will automatically handle everything.
Originally posted by @nathanhruby in https://github.com/terraref/terraref-terraform/pull/1#issuecomment-519564786