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

Let google_project_iam_policy ignore the resourcemanager.projectOwnerInvitee role #3055

Closed
pdecat opened this issue Feb 14, 2019 · 5 comments

Comments

@pdecat
Copy link
Contributor

pdecat commented Feb 14, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Given that:

Maybe the google_project_iam_policy resource should ignore the resourcemanager.projectOwnerInvitee role bound to such users when invited from the GCP web console.

Note: I realize as writing this that this kind of goes against #2315.

# terraform version
Terraform v0.11.11
+ provider.google v2.0.0
+ provider.google-beta v2.0.0

New or Affected Resource(s)

  • google_project_iam_policy

Potential Terraform Configuration

No change to configuration needed.

# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.

References

@ghost ghost added the enhancement label Feb 14, 2019
@rileykarson
Copy link
Collaborator

rileykarson commented Feb 14, 2019

We may have a similar precedent in https://github.com/terraform-providers/terraform-provider-google/blob/master/google/resource_google_project_services.go#L51 for values Terraform can't manage.

To clarify;

  • Terraform is unable to add project owners from within another organization because the REST API does not allow that operation.

  • It's possible to add project owners in the Cloud Console

  • When an owner has been invited, they're given the resourcemanager.projectOwnerInvitee. Is that permanent, or do they receive the Owner role upon acceptance?

@pdecat
Copy link
Contributor Author

pdecat commented Feb 14, 2019

Upon acceptance, resourcemanager.projectOwnerInvitee is replaced by owner.

@rileykarson
Copy link
Collaborator

Great, thanks!

In that case, I think that adding that role as an ignored role is the best solution here. Terraform will still try (and fail) to grant owner to non-organization members, but will authoritatively remove owner roles if they're not present in config once accepted.

@paddycarver paddycarver added this to the Backlog milestone Dec 11, 2019
@rileykarson
Copy link
Collaborator

We discussed this and don't think we should handle this role specially- it's likely to paper over diffs that will be detected later anyways when the invitee accepts their invite. Instead, we'd recommend managing policies with the appropriate fine-grained resources to represent the level of control Terraform has over the policy.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2023
@github-actions github-actions bot added forward/review In review; remove label to forward service/cloudresourcemanager-crm labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants