Skip to content
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

Backport of backend/s3: Ignore default workspace prefix errors into v1.7 #34513

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #34511 to be assessed for backporting due to the inclusion of the label 1.7-backport.

The below text is copied from the body of the original PR.


In versions prior to v1.6, the S3 backend ignored all errors other than NoSuchBucket when listing workspaces. This allowed cases where the user did not have access to the default workspace prefix env: to succeed.

In order to preserve this behaviour, now ignore AccessDenied errors when the user does not have access to the default workspace prefix. If workspace_key_prefix is specified, AccessDenied errors will cause a failure.

Updates documentation to list permissions needed when using workspaces.

Fixes #34223

Target Release

1.7.0

Draft CHANGELOG entry

BUG FIXES

  • backend/s3: No longer returns error when IAM user or role does not have access to the default workspace prefix env:

Overview of commits

@teamterraform teamterraform force-pushed the backport/s3/ignore-default-workspace-prefix-errors/mutually-flexible-airedale branch from 0f3105a to ed58632 Compare January 9, 2024 23:57
@teamterraform teamterraform requested a review from a team as a code owner January 9, 2024 23:57
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

% TF_ACC=1 go test ./internal/backend/remote-state/s3/...
ok      github.com/hashicorp/terraform/internal/backend/remote-state/s3 145.292s

…3/ignore-default-workspace-prefix-errors/mutually-flexible-airedale
@liamcervante liamcervante merged commit db11597 into v1.7 Jan 30, 2024
6 checks passed
@liamcervante liamcervante deleted the backport/s3/ignore-default-workspace-prefix-errors/mutually-flexible-airedale branch January 30, 2024 10:00
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link

github-actions bot commented Mar 1, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants