-
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
Add configurable workspace prefix for S3 Backend #15370
Conversation
Not sure why tests are failing on this but I don't think it's related, any help appreciated:
|
Tests pass now, was a strange timeout :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but we may want to mention the default in the doc
@@ -108,3 +108,5 @@ The following configuration options or environment variables are supported: | |||
* `assume_role_policy` - (Optional) The permissions applied when assuming a role. | |||
* `external_id` - (Optional) The external ID to use when assuming the role. | |||
* `session_name` - (Optional) The session name to use when assuming the role. | |||
* `workspace_key_prefix` - (Optional) The prefix applied to the state path inside the bucket. | |||
This is only relevant when using a non-default workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we mention the default is "env:"
?
0fcdfc0
to
22f36a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Just a minor doc-string update before merging, but otherwise, LGTM!
backend/remote-state/s3/backend.go
Outdated
"workspace_key_prefix": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Description: "The prefix applied to the state path inside the bucket", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mention that it's for non-default workspaces here? Maybe:
applied to the non-default state path
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. |
Fixes #13184, addresses part of #15358
@jbardin @apparentlymart this is my first foray into the world of Go so go please go easy :)
Does this address the points raised in the other issue? The tests still pass although I'm not sure how to add some specifically related to this. I've also tested it locally and it successfully migrated my dummy setup from the old state structure to the new.