Skip to content

Commit

Permalink
add warnings to custom roles docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emilymye committed Aug 27, 2018
1 parent b36397c commit 2fc22d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Allows management of a customized Cloud IAM organization role. For more informat
and
[API](https://cloud.google.com/iam/reference/rest/v1/organizations.roles).

~> **Warning:** Note that custom roles in GCP have the concept of a soft-delete. There are two issues that may arise
from this and how roles are propagated. 1) creating a role may involve undeleting and then updating a role with the
same name, possibly causing confusing behavior between undelete and update. 2) A deleted role is permanently deleted
after 7 days, but it can take up to 30 more days (i.e. between 7 and 37 days after deletion) before the role name is
made available again. This means a deleted role that has been deleted for more than 7 days cannot be changed at all
by Terraform, and new roles cannot share that name.

## Example Usage

This snippet creates a customized IAM organization role.
Expand Down
9 changes: 7 additions & 2 deletions website/docs/r/google_project_iam_custom_role.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Allows management of a customized Cloud IAM project role. For more information s
and
[API](https://cloud.google.com/iam/reference/rest/v1/projects.roles).

~> **Warning:** Note that custom roles in GCP have the concept of a soft-delete. There are two issues that may arise
from this and how roles are propagated. 1) creating a role may involve undeleting and then updating a role with the
same name, possibly causing confusing behavior between undelete and update. 2) A deleted role is permanently deleted
after 7 days, but it can take up to 30 more days (i.e. between 7 and 37 days after deletion) before the role name is
made available again. This means a deleted role that has been deleted for more than 7 days cannot be changed at all
by Terraform, and new roles cannot share that name.

## Example Usage

This snippet creates a customized IAM role.
Expand Down Expand Up @@ -45,8 +52,6 @@ The following arguments are supported:

* `description` - (Optional) A human-readable description for the role.

* `deleted` - (Optional) The current deleted state of the role. Defaults to `false`.

## Import

Customized IAM project role can be imported using their URI, e.g.
Expand Down

0 comments on commit 2fc22d6

Please sign in to comment.