This morning I made a PR which triggered a Cloud Build for my staging enviroment but failed to deploy the results to GAE.
The error was as follows:
ERROR: (gcloud.app.deploy) PERMISSION_DENIED: You do not have permission to act as '[redacted]@appspot.gserviceaccount.com' Step #4: - '@type': type.googleapis.com/google.rpc.ResourceInfo Step #4: description: You do not have permission to act as this service account. Step #4: resourceName: [redacted]@appspot.gserviceaccount.com Step #4: resourceType: serviceAccount
When I look at https://console.cloud.google.com/cloud-build/settings/service-account Cloud build has the follow service account permissions ENABLED:
- App Engine Admin
- Cloud KMS
Checking https://console.cloud.google.com/iam-admin/iam I can see that the cloudbuild service account has the following roles:
- App Engine Admin
- App Engine Deployer
- Cloud Build Service Account
- Cloud KMS CryptoKey Decrypter