-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adds support for Public Access Prevention #10670
Adds support for Public Access Prevention #10670
Conversation
If this looks good I'll probably need some guidance getting it applied correctly. From a preliminary reading it sounds like I should be modifying this file instead: and renaming that to |
Great, thanks. Do you want me to start on a PR in that |
taking a look now ~ thanks for your patience |
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.
Only concerns that I have currently as long as tests pass. If you could make a pull request at the upstream repository as mentioned and tag me that would be most appreciated.
cfg := &storage.BucketIamConfiguration{ | ||
ForceSendFields: []string{"UniformBucketLevelAccess"}, | ||
UniformBucketLevelAccess: &storage.BucketIamConfigurationUniformBucketLevelAccess{ | ||
Enabled: d.Get("uniform_bucket_level_access").(bool), | ||
ForceSendFields: []string{"Enabled"}, | ||
}, | ||
} |
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.
This is changing existing behavior... we should craft the object manually so that we only configure the object with these properties if UniformBucketLevelAccess
is present on the config. I recommend checking uniform_bucket_level_access
and configuring it appropriately.
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.
Isn't that what the code currently does at L592? expandIamConfiguration
is only called if:
if d.HasChange("uniform_bucket_level_access") || d.HasChange("public_access_prevention") {
sb.IamConfiguration = expandIamConfiguration(d)
}
This check was already there, I added the test for public_access_prevention
.
The tests look promising locally, although the CI/CD workflow looks like it still needs approval. I'll prepare the upstream changes now.
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.
Raised GoogleCloudPlatform/magic-modules#5519 and tagged you there. Thanks!
I've requested the relevant changes and expanded on my requests there... closing this pr as it is superseded by the new one. |
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 issues. |
No description provided.