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

google_project_iam_custom_role should be given a role_id_prefix field to make management easier. #11311

Open
james-lawrence opened this issue Mar 19, 2022 · 2 comments

Comments

@james-lawrence
Copy link

james-lawrence commented Mar 19, 2022

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

google_project_iam_custom_role documents the role management issue with soft deletes. which is nice and all but doesn't improve the experience of managing roles.

effectively this solves the error from occurring when doing a destroy / apply cycle.

propose a role_id_prefix field is added like in various other resources to generate a random suffix. currently managing this manually using a random_id but be nice to just have it builtin to the resource.

New or Affected Resource(s)

google_project_iam_custom_role

Potential Terraform Configuration

resource "google_project_iam_custom_role" "default" {
role_id_prefix = "my_role_"
title = "my role"
}

b/308569543

@rileykarson
Copy link
Collaborator

Note: this is just a slightly different name for name_prefix, given the field's called role_id

@rileykarson rileykarson added this to the Goals milestone Mar 28, 2022
@danil-smirnov
Copy link

Faced the same issue since

After the role has been permanently deleted, up to 44 days after the initial deletion request, you can create a new role using the same role ID.

See https://cloud.google.com/iam/docs/creating-custom-roles#deleting-custom-role

@github-actions github-actions bot added forward/review In review; remove label to forward service/iam-core labels Aug 17, 2023
@roaks3 roaks3 added feature-request and removed service/cloudresourcemanager-crm forward/review In review; remove label to forward labels Oct 30, 2023
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Aug 6, 2024
[upstream:95ad39b90ef375140e80f1d2bba8beba3a00ec03]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Aug 6, 2024
[upstream:95ad39b90ef375140e80f1d2bba8beba3a00ec03]

Signed-off-by: Modular Magician <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants