-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Refactored authoritative IAM policy logic to be reusable #776
Conversation
--- PASS: TestAccGoogleFolderIamPolicy_basic (16.82s)
--- PASS: TestAccGoogleFolderIamPolicy_update (20.12s) |
0899026
to
720ae93
Compare
google/iam_folder.go
Outdated
} | ||
|
||
func (u *FolderIamUpdater) GetMutexKey() string { | ||
return fmt.Sprintf("iam-project-%s", u.folderId) |
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.
s/project/folder
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.
Fixed
google/iam_folder.go
Outdated
} | ||
|
||
func (u *FolderIamUpdater) DescribeResource() string { | ||
return fmt.Sprintf("project %q", u.folderId) |
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.
here too
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.
Fixed
google/iam_folder.go
Outdated
out := &resourceManagerV2Beta1.Policy{} | ||
err := Convert(in, out) | ||
if err != nil { | ||
return nil, fmt.Errorf("Cannot convert a v1 oolicy to a v2beta policy: %s", err) |
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.
typo: s/oolicy/policy
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.
Fixed
google/iam_folder.go
Outdated
out := &cloudresourcemanager.Policy{} | ||
err := Convert(in, out) | ||
if err != nil { | ||
return nil, fmt.Errorf("Cannot convert a v2beta oolicy to a v1 policy: %s", err) |
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.
here too
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.
Fixed
Signed-off-by: Modular Magician <magic-modules@google.com>
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Similar to the work I did for IAM binding and member resources in #744.
Could not reuse it for project because of the deprecated
authoritative
boolean field. Once we bump the version and remove the deprecated field in project, we can reuse the same logic. I created an issue to track this work once the field is removed #777.