Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I grant the account permission to list enabled APIs?

During a build on Cloud Build, I get the following warning:

Step #2: WARNING: Unable to verify that the Appengine Flexible API is enabled for project [xxxxx]. You may not have permission to list enabled services on this project. If it is not enabled, this may cause problems in running your deployment. Please ask the project owner to ensure that the Appengine Flexible API has been enabled and that this account has permission to list enabled APIs.

I'd like to get rid of this warning to get a clean build log.

Since the build succeeds, the problem must not be with Appengine Flexible API being disabled. No; the problem must be that the account does not have permission to list enabled APIs.

How can I fix that (either in the Console or at the command line)?

like image 336
jub0bs Avatar asked Aug 18 '18 21:08

jub0bs


1 Answers

To list the services available, you need the permission services.list. You can grant this permission via granting a role that includes said permission, like roles/serviceusage.serviceUsageViewer, or you can create your own personalised role with that permission only, if you wish to.

On how to enable the API: First check if said account has or hasn't said API enabled, which looks unlikely, with $ gcloud services list. By default, it shows all the enabled services for said account.

If you can't see 'appengineflex.googleapis.com' in said list, you can run $ gcloud services enable appengineflex.googleapis.com to do so.

like image 127
Mangu Avatar answered Nov 01 '22 15:11

Mangu