Skip to content

Commit

Permalink
fix(lab 5): typos
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikFricke committed May 9, 2022
1 parent 81742f0 commit 5dc97b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 5-remote-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Remote Backend

In the last lab of the Terraform workshop, we need to talk about the state. A very important part of *infrastructure as code*. During the workshop, we applied many changes and Terraform was always smart enough to update the AWS resources. How does it work? You might have noticed the auto-generated files `terraform.tfstate` and `terraform.tfstate.backup`. Terraform persists every single state of every AWS resource in the Terraform state. When applying a new update, Terraform compares the desired state with the current state and calculates a diff. Based on the diff, Terraform update the AWS resources and also update the state afterwards. Without the Terraform state, Terraform would lose the connection to the AWS resources and wouldn't know how to handle updates. As you can see, the Terraform state is very crucial.
In the last lab of the Terraform workshop, we need to talk about the state. A very important part of *infrastructure as code*. During the workshop, we applied many changes and Terraform was always smart enough to update the AWS resources. How does it work? You might have noticed the auto-generated files `terraform.tfstate` and `terraform.tfstate.backup`. Terraform persists every single state of every AWS resource in the Terraform state. When applying a new update, Terraform compares the desired state with the current state and calculates a diff. Based on the diff, Terraform updates the AWS resources and also updates the state afterward. Without the Terraform state, Terraform would lose the connection to the AWS resources and wouldn't know how to handle updates. As you can see, the Terraform state is very crucial.

Until now, we used local files for the Terraform state. That's okay for a workshop but doesn't work for production workloads. The problem is, that we always need the state to apply changes. So if you want to work on the same stack with a team or some form of automation, then you need to share the state with others. The recommended solution is a remote backend. In this workshop, we focus on an S3 bucket, but you have [different options](https://www.terraform.io/language/settings/backends). Instead of keeping the state locally, we upload the state to the S3 bucket and read the current status from there.

Expand Down

0 comments on commit 5dc97b0

Please sign in to comment.