State-Locking

📁 See the State-lock Folder →

Terraform will be used to deploy the infrastructure. However, before starting to deploy anything, it is necessary to apply state-locking.

State-locking allows the Terraform state to be locked when someone is modifying the infrastructure. This prevents multiple Ops from modying it at the same time, which will cause damages to the infrastructure.

To make state-locking working, the state has to be synchronized between the entire Ops team: in other words, we need to make a remote state; and since the entire infrastructure is created on AWS, the remote state will be stored in an S3 bucket, and will be locked via DynamoDB.

State-lock