I had mistakenly deleted a default "service account" for my project - {project_id}-compute@developer.gserviceaccount.com Now whenever I try to create a cluster on Data proc I get the following error:
The resource '{project_id}-compute@developer.gserviceaccount.com' of type 'serviceAccount' was not found.
Is there an easy way to resolve this issue - without losing any data for the project.
To clarify to anyone else who encounters this issue, this error is caused by actually deleting the service account, and not simply from removing it from the list of "project editors" under the
IAM and Admin
options; to anyone who only removed the account from the project editor list, you can simply add it back using the normal "Add Member".Generally the service account gets created at the time the Compute Engine API is enabled, so at the moment it works to fix this issue simply by disabling and then re-enabling the Compute Engine API through the API Manager.
This could cause problems if you already have existing Compute Engine VMs running which you depend on for your production capabilities, but if you deleted the service account, then those VMs are likely somewhat broken anyways.
Find
Google Compute Engine API
there and click on "disable", and make sure to click theDisable
button on the confirmation prompt instead of theCancel
button.When re-enabling the Compute Engine API, you may encounter the following error:
but if you wait a couple minutes and try again, it should work (I waited about 3 minutes before trying again, but the required wait may vary). Likewise, at first after re-enabling the Compute API and immediately trying to create a new Dataproc cluster, you may hit:
But as it mentions, again waiting a couple minutes lets the settings propagate and it should load fine again.
Once the Compute Engine API is re-enabled sufficiently that Dataproc's
Create Cluster
page works on the cloud console, you can also verify again underIAM and Admin
that the default compute service account exists again and that it has been auto-added as aProject editor
as well.