Cloud Composer is not getting deleted properly with this error:
DELETE operation on this environment failed 4 days ago with the following error message: RPC Skipped due to required preoperation not finished yet.
RPC Skipped due to required preoperation not finished yet.
Please, follow the below steps to delete environments resources manually:
gcloud deployment-manager deployments delete <DEPLOYMENT_NAME> --delete-policy=ABANDON
gcloud composer environments delete <ENVIRONMENT_NAME> --location <LOCATION>
The problem you are facing could be also related with a misconfiguration with the Cloud Composer service account in your project. By default, Cloud Composer environments run as the Compute Engine default service account, but when you are using a custom service account, at a minimum, that service account requires the permissions that the composer.worker
role provides to access resources in the Cloud Composer environment. Please refer to this documentation for further details about how to grant a role to a service account.
Please, try to add the policy binding for Cloud Composer API Service Agent role to the service account, so the command would be:
gcloud projects add-iam-policy-binding <PROJECT_ID> --member=<MEMBER> --role=roles/composer.serviceAgent
The member
should be of the form user|group|serviceAccount:email
or domain:domain
(refer to documentation).
Then, please retry the action of remove your Composer environments. I hope you find the above pieces of information useful.