-
Notifications
You must be signed in to change notification settings - Fork 973
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 iam_by_principals_additive
to project, organization and folder modules
#2814
Conversation
I like this, the implementation is simple and readable. I'm just slightly concerned about the additional additive surface this introduces, which IMHO will just make it easier to create unintentional overlaps between authoritative and additive. But that's kind of inevitable and the new interface might actually be useful, so... As for how many resources, my preference would be for a single one but I don't think it makes a lot of difference TBH, both should work. |
1781dfb
to
22d4050
Compare
iam_by_principals_additive
iam_by_principals_additive
to project, organization and folder modules
If any, I'd add a check, if there is any overlap in roles between authoritative roles and additive ones, though in my experience, this was usually caused by IAM grants managed by separate modules. |
This pull request introduces the
iam_by_principals_additive
variable to the folder module, addressing the feature request outlined in #2805.This implementation merges the functionality of
iam_by_principals_additive
with the existingiam_bindings_additive
logic, utilizing a singlegoogle_folder_iam_member
resource. While the core implementation is straightforward, the validation logic requires further review and likely expansion. Currently, validation only prevents the same principal/role combination from being defined in bothiam_bindings_additive
andiam_by_principals_additive
.Open questions:
google_folder_iam_member
resource for all additive bindings, or would a separate dedicated block foriam_by_principals_additive
be preferable?iam_by_principals_additive
to be consistent with the existingiam_bindings_additive
naming.Usage would be something like this:
And this should fail:
Thoughts?