Skip to content

Conversation

@Chaffelson
Copy link
Contributor

When a custom role on GCP is 'deleted', it is actually only marked for deletion and may not be fully removed for 7-14days, during which time it may be undeleted. The role already handles this option.
However once it is fully deleted, the same name (role_id) may not be reused for 30 days, meaning that a deleted custom role is ambiguously unavailable for the 37-44 days following a deletion request.
Therefore in this change, we break out the GCP custom roles to a separate deletion flag, which defaults to yes.
We also handle undelete, and failed undelete elegantly with a meaningful error message.
We also remove the extraneous loop on the custom role, as there is only a single one handled.

Signed-off-by: Daniel Chaffelson [email protected]

When a custom role on GCP is 'deleted', it is actually only marked for deletion and may not be fully removed for 7-14days, during which time it may be undeleted. The role already handles this option.
However once it is fully deleted, the same name may not be reused for 30 days, meaning that a deleted custom role is ambiguously unavailable for the next 37-44 days.
Therefore in this change, we break out the GCP custom roles to a separate deletion flag, which defaults to yes

Signed-off-by: Daniel Chaffelson <[email protected]>
@Chaffelson Chaffelson added the enhancement MINOR - New feature or enhancement in the CHANGELOG label Sep 11, 2021
describe {{ plat__gcp_log_role_name }}
--project={{ plat__gcp_project }}
register: __gcp_custom_log_role_info
failed_when:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be combined with the assert below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to run the command to get the response message, but I'm not aware of a method to give a detailed fail_msg in a failed_when?

@wmudge wmudge merged commit 00ac438 into cloudera-labs:devel Oct 29, 2021
wmudge added a commit to wmudge/cloudera.exe that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement MINOR - New feature or enhancement in the CHANGELOG

Development

Successfully merging this pull request may close these issues.

3 participants