I am trying to deploy a go 1.11
runtime that used to work, but recently I\'ve been getting: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve sou
Cloud Build uses a service account instead of your user credential, so adding roles to your user won't help in this case.
You should be able to manually add the service account, [project-number]@cloudbuild.gserviceaccount.com, back to your account without re-enabling the API. Some users are known to delete random service accounts they don't recognize, which can sometimes cause this issue.
In summary, check if the service account exists. If so, give it all the roles it needs; if not, then create it and give it all the role it needs.
I found that it took a while for the API permissions to propagate fully.
I had this error after enabling the App Engine Admin API, but I waited a few minutes and tried again and it worked fine.
Try disabling and enabling the Cloud Build API in your project so a new service account is created, then try to deploy again.
This ensures that Cloud Build has permission to start builds (the service account name should look like project-number@cloudbuild.gserviceaccount.com).