-
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
Destroying a google_cloud_identity_group resource that has at least one OWNER member fails #7617
Comments
@sruffilli the error message seems clear. It is blocked by API. The provider has nothing to do with it. To workaround, can you update the role to non OWNER first and then apply |
APIs prevent the last OWNER of a group to be downgraded or deleted. |
Let's see if there is anything the provider can do to match the API's behavior |
Similar to #7616, this resource is not implemented as well as it could be - it seems there were some API changes since we implemented it. We should revisit this entire resource. |
I see GoogleCloudPlatform/cloud-foundation-fabric#182 referenced above was merged 18 days ago this comment. What would the timing be for this to be taken advantage of by this provider, to know what version would need to be targeted to get this working. |
…ce agent (hashicorp#7617) * Update tests to use bootstrapped crypto permissions for compute service agent * Fix templates * Fix one more template Signed-off-by: Modular Magician <[email protected]>
…ce agent (#7617) (#14243) * Update tests to use bootstrapped crypto permissions for compute service agent * Fix templates * Fix one more template Signed-off-by: Modular Magician <[email protected]>
Terraform Version
Affected Resource(s)
Terraform Configuration Files (if applicable)
Issue Description
Destroying a group that has at least one OWNER member fails with the following error
Error: Error when reading or editing GroupMembership: googleapi: Error 400: Error(4007): Cannot remove the OWNER role in membership 'groups/xxxxxxxxxxxxxx/memberships/NNNNNNNNNNNNNNNNNN' becuase it's the last OWNER role in the Google Groups.
This happens because terraform tries to deprovision all the google_cloud_identity_group_membership resources that depend on google_cloud_identity_group first - however APIs prevent deleting the last OWNER member. Note that this doesn't happen if a group has no OWNER members.
b/374162521
The text was updated successfully, but these errors were encountered: