Storing state files remotely
As you know, by default, Terraform will store the state
file on your local disk and you have to figure out yourself how to distribute it within your team. One option you learned is to store it in the git
repository: you get the workflow, you get the versioning and you even get some level of security on top. But there is also a concept of remote state provided by Terraform.
The idea is that before you start applying your templates, you configure a remote storage. After that, your state
file will be pulled and pushed from a remote facility. There are 11 backends for your state provided by Terraform: Consul, S3, etcd, Atlas, and others. You will learn how to use Simple Storage Service (S3) for this purpose.
Note
Atlas is ...
Get Getting Started with Terraform now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.