Skip to content

v1.537.2

Latest
Compare
Choose a tag to compare
@cloudposse-releaser cloudposse-releaser released this 15 Aug 02:02
· 7 commits to main since this release
c64e9c7
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 in src/README.md and variable definition in src/variables.tf. [1] [2]
  • Updated local logic in src/main.tf to disable DynamoDB automatically when s3_state_lock_enabled is true, and passed this value to the tfstate_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

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 docs

why

To have most recent changes of README.md and doc from origin templates