-
-
Notifications
You must be signed in to change notification settings - Fork 179
Support S3 Native State Locking #184
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
Comments
@kksudo is the potential answer here to just set the |
@osterman Any update on the implementation of this feature?. Within the current Cloud Posse terraform-aws-tfstate-backend and using Terraform 1.11.0 , I have started receiving deprecation warnings > Warning: Deprecated Parameter |
@scottdspangler is that an issue with the outputted template file? If so, you can feel free to edit that template after it is written or provide your own template file. I know that we've previously discussed removing that templating altogether because it's largely not necessary and we could accomplish the same for consumers through an cc @Nuru as I believe you and I were the ones who were chatting about removing the templating functionality. |
@kksudo friendly ping on my previous question to you as well -- I'm interested if that works for you moving forward. This functionality of using native state locking currently diverges between Terraform + OpenTofu and we can't expect this module to only support the native state locking in the short term. |
For some reason, I did not test this option. In my case, I implemented this functionality myself on my end. |
Describe the Feature
Terraform v1.10 introduced native S3 state locking through the use_lockfile attribute.
Previously, state file locking required access to a DynamoDB table, but this is no longer necessary.
Expected Behavior
The
terraform-aws-tfstate-backend
module should support theuse_lockfile
attribute in the Terraform backend configuration for S3. This would allow users to enable native S3 state locking, eliminating the need for provisioning a DynamoDB table for state file locking.Use Case
Currently, the
terraform-aws-tfstate-backend
module sets up a DynamoDB table alongside the S3 bucket for state storage to handle state file locking. With Terraform v1.10 introducing S3 native state locking, the need for DynamoDB can be completely removed, simplifying the infrastructure setup.This feature is valuable for:
For example, users managing state files in a less complex environment, such as those without heavy requirements for DynamoDB-specific features like point-in-time recovery, can now have a more streamlined experience.
Describe Ideal Solution
The module should include an optional parameter (e.g.,
enable_native_locking
) to toggle the use of S3 native state locking.true
, the module should configure the backend to includeuse_lockfile = true
, and skip creating a DynamoDB table.false
(default for backward compatibility), the existing behavior with DynamoDB state locking should remain intact.This ensures both backward compatibility and support for the new native locking feature, allowing users to choose the solution that best fits their needs.
Alternatives Considered
No response
Additional Context
https://developer.hashicorp.com/terraform/language/backend/s3#state-locking
The text was updated successfully, but these errors were encountered: