Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error while enabling the Google Cloud Build API for my projects?

Before a few days i got mail.

Enable the Cloud Build API for your projects before April 20, 2020, to ensure Cloud Function is built and deployed correctly.

  1. Access the Cloud Build API link in the Cloud Console.
  2. Select your project from the drop-down menu.
  3. Click Continue to enable the Cloud Build API for the project. A box will appear in the lower-left corner to confirm the API is enabled.

After click i getting following error for some permission

This API cannot be enabled at the moment. You may lack appropriate permissions. 

Error Image.

So, which type of permission required i need to enable this service ?

like image 954
Vora Avatar asked Mar 16 '20 22:03

Vora


People also ask

What is needed for GCP API in project?

To enable the API, you must first create an Google Cloud Platform project. This project forms the basis for creating, enabling, and using all Google Cloud Platform (GCP) services, including managing APIs, enabling billing, adding and removing collaborators, and managing permissions. Open the Google Cloud Console.

How do I see Google API errors?

Google APIs define a set of standard error payloads for error details, which you can find in google/rpc/error_details.


Video Answer


2 Answers

The specific permissions that a user needs to enable APIs for a GCP project are:

  • serviceusage.services.enable

  • servicemanagement.services.bind

If you are already the owner of your project, you shouldn't have to add the roles/servicemanagement.serviceConsumer role to your account to enable an API.

You also need to enable billing on the project before you can enable new APIs.

like image 158
Maximus Macdonald Avatar answered Sep 18 '22 14:09

Maximus Macdonald


The error I was getting


This API cannot be enabled at the moment. You may lack appropriate permissions.


The issue for me was I have multiple google / gmail accounts and when I changed deploy location I had to logout and then log back in:

firebase logout

and then log back in

firebase login

This was followed by opening browser and then selecting the appropriate google user to deploy application with.

like image 41
Michael Nelles Avatar answered Sep 20 '22 14:09

Michael Nelles