Skip to content

Support S3 only locks for AWS state? #1929

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

Open
danielloader opened this issue Mar 31, 2025 · 1 comment
Open

Support S3 only locks for AWS state? #1929

danielloader opened this issue Mar 31, 2025 · 1 comment

Comments

@danielloader
Copy link

danielloader commented Mar 31, 2025

Context

AWS offers strong consistency options on writes on S3 now, so can be utilised as a lock store.

OpenTofu is shipping it next release - opentofu/opentofu#599
Terraform has it enabled already - hashicorp/terraform#35661

The ask

Would it be possible to use Digger with S3 state lock akin to how GCP locking works?

Thanks

@motatoes
Copy link
Contributor

motatoes commented Apr 5, 2025

Hi @danielloader , yes its possible for sure. We can introduce a seperate interface for s3-only locking on AWS and gradually deprecate the one based on dynamoDB. There are some open questions:

  • would the user need to specify the bucket themselves or digger would create a globally unique one on the first run? If the latter than how would digger remember which bucket it used for the locks of that repo - since s3 buckets are globally unique we need a way to remember which bucket was created to store the locks per account. If the user is going to specify the locks bucket then it becomes simpler
  • Do we keep both dynamodb and S3 as options for AWS locking or deprecate dynamoDB. I think both seem like feasible options to me and could be based on user preference

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

No branches or pull requests

2 participants