EXTERNAL: The user does not have access to service account “default” and APi can’t be reEnable

google-cloud-platformgoogle-compute-engine

I have same issue Default service account for compute engine do not work. Every time when i want create instance with out –service-account flag. With my own service account every thing work fine, But i need deafult to work with docker+machine.

gcloud compute instances create test-inst return

ERROR: (gcloud.compute.instances.create) Could not fetch resource:
– The resource '1045904521672-compute@developer.gserviceaccount.com' of type 'serviceAccount' was not found.
But when i try Disable COMPUTE API. I'am Also get error Enable/disable steps failed for services [compute.googleapis.com]

What i'am do wrong?

Best Answer

You can check that the default service account is still available for use:

Go to the Google Cloud Platform Console and click on ‘Products & Services’ which is the icon with the four bars at the top left hand corner. On the menu go to the Products section and hover on ‘IAM & admin’ and then click on ‘Service accounts’ to see if the default service account hasn’t been deleted.

If the account is not there it explains why you can’t create a VM using this default service account.

You can try to recover a default service account in two ways: You can disable and re-enable the Google Compute Engine API in your project. This will only work if you have no GCE resource (e.g VMs, Disks, Snapshots, etc) in your project, otherwise you will get "Backend Provisioning Error" when you try to disable Compute Engine API.

You can get another Compute Engine default Service Account by enabling for example the ‘Dataproc’ API:

Go to the Google Cloud Platform Console and click on ‘Products & Services’ which is the icon with the four bars at the top left hand corner. On the menu go to the ‘Big Data’ section and click on ‘Dataproc’. Click on Enable API and after a short time a new default service account will be created.

You can use this new default Service Account to work with.
Please note that previous resources created with the previously deleted service account might not function properly.

Another solution would be creating a new project and redeploying your instances there.

Related Topic