Reputation: 66364
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)?
Upvotes: 17
Views: 8401
Reputation: 9
In my case the billing wasn't setup for the project I wanted to enable api. So I did:
From the navigation menu go Billing, go to your billing account, choose settings for the project and change the billing setting.
Upvotes: 0
Reputation: 1301
I ran into this issue today. I needed to makes sure that billing was enabled on the project and my profile. I would check the Billing section for those that also see this issue.
Upvotes: 0
Reputation: 878
To verify your account and enable the API within the cloudbuild I had to add the account as role/App Engine Deployer
and that worked on my case.
Also on another project I've created new SA and that I've added Editor
permissions and that worked too. It was for testing purposes but it worked.
The steps to verify that it's working too below :
gcloud config set account youraccountname
gcloud config set project yourprojectname
Then :
- gcloud auth activate-service-account [email protected] --key-file=yourfilekey.json
Then to verify that it's working do : gcloud services list
and you will see all the NAME
and the TITLE
of your services list.
Upvotes: 0
Reputation: 3325
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.
Upvotes: 20