gcloudgoogle-cloud-iam

gcloud build requires "serviceusage.services.use", but i already have owner role


I am trying to submit a build using this command in the gcloud CLI:

gcloud builds submit --config cloudbuild.yaml .

but it returns this error:

(gcloud.builds.submit) The user is forbidden from accessing the bucket [fastapi-api_cloudbuild]. Please check your organization's policy or if the user has the "serviceusage.services.use" permission

I checked in the IAM admin panel and it says that my account has the owner role and that i have most permissions, and i authenticated in the gcloud cli, but i still get said error, i havent tried much since i have no idea what i could try since i already have the highest role. thank you.


Solution

  • I had a similar issues (caused by the change of the billing account), and I fixed it by disabling Google Cloud Build API and re-enabling.

    I used this commands:

    gcloud services disable cloudbuild.googleapis.com --project "my_project"

    gcloud services enable cloudbuild.googleapis.com --project "my_project"