-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Allow s3 backends to contain more then 1000 workspaces #22963
Conversation
* backend/remote-state/s3/backend_state.go: Prior to this commit, the terraform s3 backend did not paginate calls to s3 when finding workspaces, which resulted in workspaces 'disappearing' once they are switched away from, even though the state file still exists. This is due to the ListBucket operation defaulting MaxItems to 1000, so terraform s3 backends that contained more then 1000 workspaces did not function as expected. This rectifies this situation by paginating calls to s3 when finding workspaces. Signed-off-by: Collin J. Doering <[email protected]>
This is actively affecting us. Would it be possible to fit this into the next minor release @apparentlymart? Also for those affected by this, you can work around it by setting |
I ran the acceptance tests on this (on top of #23631) and they've passed, and I tested the fix through (i.e., make 1000+ workspaces, validated that this fixed the issue). Test results:
|
Thank you for this PR! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This resolves #15968
not paginate calls to s3 when finding workspaces, which resulted in workspaces 'disappearing'
once they are switched away from, even though the state file still exists. This is due to the
ListBucket operation defaulting MaxItems to 1000, so terraform s3 backends that contained
more then 1000 workspaces did not function as expected. This rectifies this situation by
paginating calls to s3 when finding workspaces.
Signed-off-by: Collin J. Doering [email protected]