·
7 commits
to main
since this release
Add S3 State Locking Input @milldr (#39)
## what This pull request introduces support for using S3-based state locking as an alternative to DynamoDB for Terraform state management. It adds a new variable to control this behavior and ensures that DynamoDB resources are not created when S3 state locking is enabled. The changes also make sure that documentation and outputs reflect the new logic.Support for S3 State Locking:
- Added a new variable
s3_state_lock_enabled
to allow switching between DynamoDB and S3 for state locking, with documentation updates insrc/README.md
and variable definition insrc/variables.tf
. [1] [2] - Updated local logic in
src/main.tf
to disable DynamoDB automatically whens3_state_lock_enabled
is true, and passed this value to thetfstate_backend
module.
Conditional Resource and Output Handling:
- Modified the IAM policy document in
src/iam.tf
to use the new local variable for enabling DynamoDB, ensuring the correct resource is referenced. - Updated outputs in
src/outputs.tf
to use the local DynamoDB enabled flag, so DynamoDB outputs are empty when S3 state locking is used.
why
- Fix issues using S3 statefile locking rather than DynamoDB
references
- Fixes #33
Summary by CodeRabbit
- New Features
- Added option to enable S3-based state locking via a new input; when enabled, DynamoDB state-lock resources are not created.
- Module now honors the new setting across configuration, ensuring consistent behavior.
- Documentation
- Updated README to document the new input and its behavior.
- Refactor
- Updated internal logic so DynamoDB-related outputs and permissions are conditionally exposed based on the new setting.
🤖 Automatic Updates
Update README.md and docs @[cloudposse-releaser[bot]](https://github.com/apps/cloudposse-releaser) (#40)
## what This is an auto-generated PR that updates the README.md and docswhy
To have most recent changes of README.md and doc from origin templates