at0S / dev-tools

Common tools, to support development, in a single repo, backed by Terraform
MIT License
2 stars 1 forks source link

Backend to store Terraform state #1

Closed at0S closed 3 years ago

at0S commented 3 years ago

Description

Terraform is a very flexible tool, to extend that the fully managed infrastructure state is in the hands of the developer in the form of a state file. A couple of options here, really:

  1. Store the file on S3 and lock it away with DynamoDB.
  2. Use TerraformCloud and it will take care of all the complexities.
  3. Run Consul nearby and use it to host the state.

Would be nice to supplement this with a nice doco.

at0S commented 3 years ago

Done when:

  1. The local terraform invocation clearly states that S3 backend is in use.
  2. After running terraform apply terraform.tfstate file is present in the nominated S3 bucket.
  3. Script to automate requested S3 bucket, role, Dynamo table is in the repository
  4. Wiki page with steps to reproduce setup is in the Wiki