"You do not have permission to enable Compute Engine" from GCloud
I created a new project for the user and gave them a role Compute Instance Admin
. However, when they first load the project, they get the error "
You do not have permission to enable Compute Engine.
As the owner, I need to visit the Compute page to initialize the project. At this point, users will be able to access Google Compute.
Is there a way to automate enabling the Compute Engine for a project? Or, is there a role that I can add for this user?
Is there a way to automate enabling the Compute Engine for a project?
If Cloud SDK is installed ,
$ gcloud service-management enable --project foo compute-component.googleapis.com
must do the trick. Otherwise, you can call Google Service Management using some other method.
Or, is there a role that I can add for this user?
From the API docs :
Authorization requires the following Google IAM permissions for the specified resource
service_name
:
servicemanagement.services.bind
Offline, I don't know which roles have this permission.
Enabling the API requires more responsibility. compute.instanceAdmin.v1
the role prevents users from enabling the API.
If you are the owner and enabled GCE API
, it may take a few minutes before users can access GCE
, as some resources need to be configured in the project, such as defaults, networks, firewalls, and routes.
To enable the API in a project, the minimum required role is the project editor.