Terraform Version
Terraform v1.7.5
on darwin_arm64
Use Cases
- S3 for state management is one of the strongest alternatives to remote, however a dynamodb is required for state locking, which increases complexity, although not by much.
Attempted Solutions
Based on the current implementation of S3 there isn't an alternate solution.
Proposal
AWS S3 nowadays comes with an object lock mechanism, which could be utilized instead of relying to DynamoDB to lock the state. Per AWS docs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html#object-lock-legal-holds) the object lock uses WORM, that can be applied on demand (legal hold), which would prevent multiple runs from altering the state.
References
Terraform Version
Use Cases
Attempted Solutions
Based on the current implementation of S3 there isn't an alternate solution.
Proposal
AWS S3 nowadays comes with an object lock mechanism, which could be utilized instead of relying to DynamoDB to lock the state. Per AWS docs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html#object-lock-legal-holds) the object lock uses WORM, that can be applied on demand (legal hold), which would prevent multiple runs from altering the state.
References