Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock Terraform state on S3 #138

Open
LucaCinquini opened this issue Jun 29, 2024 · 1 comment
Open

Lock Terraform state on S3 #138

LucaCinquini opened this issue Jun 29, 2024 · 1 comment
Assignees
Labels

Comments

@LucaCinquini
Copy link
Collaborator

No description provided.

@LucaCinquini LucaCinquini converted this from a draft issue Jun 29, 2024
@LucaCinquini
Copy link
Collaborator Author

When storing the Terraform state on S3, it is recommended that the state file is locked via a DynamoDB table, to prevent concurrent updates. This involves creating a DynamoDB table via Terraform and updating the S3 backend snippet for EKS, Karpenter and SPS. See instructions: https://developer.hashicorp.com/terraform/language/settings/backends/s3

In particular:

Stores the state as a given key in a given bucket on Amazon S3. This backend also supports state locking and consistency checking via Dynamo DB, which can be enabled by setting the dynamodb_table field to an existing DynamoDB table name. A single DynamoDB table can be used to lock multiple remote state files. Terraform generates key names that include the values of the bucket and key variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants