GoogleCloudPlatform/gke-autoneg-controller

Custom role error when recreating project

Closed this issue · 0 comments

We have a GCP project that we use to test new infrastructure changes, once the test is done, we tear down all the infrastructure.
We recently switched to using the module provided in the project and we are facing some issues when recreating the custom role.

Received unexpected error:
            	FatalError{Underlying: error while running command: exit status 1; �[31m╷�[0m�[0m
            	�[31m│�[0m �[0m�[1m�[31mError: �[0m�[0m�[1mError creating the custom project role projects/<project-id>/roles/autonegRegional: googleapi: Error 400: You can't create a role_id (autonegRegional) which has been marked for deletion., failedPrecondition�[0m
            	�[31m│�[0m �[0m
            	�[31m│�[0m �[0m�[0m  with module.dwam_test.module.autoneg[0].module.gcp.google_project_iam_custom_role.autoneg,
            	�[31m│�[0m �[0m  on .terraform/modules/dwam_test.autoneg/terraform/gcp/main.tf line 57, in resource "google_project_iam_custom_role" "autoneg":
            	�[31m│�[0m �[0m  57: resource "google_project_iam_custom_role" "autoneg" �[4m{�[0m�[0m
            	�[31m│�[0m �[0m
            	�[31m╵�[0m�[0m}