I have a Cloud Build I want to run from the command line. However when I try to run the build from my terminal, it raises this error:
$ gcloud builds submit --region=asia-east1 --config cloudbuild.yaml
Creating temporary tarball archive of 1 file(s) totalling 96 bytes before compression.
Uploading tarball of [.] to [gs://<REDACTED>.tgz]
ERROR: (gcloud.builds.submit) PERMISSION_DENIED: generic::permission_denied: Permission iam.serviceAccounts.get is required to perform this operation on service account projects/<PROJECT_ID>/serviceAccounts/<MY_SERVICE_ACCOUNT>.
I have given the role Service Account User
to both the above service account, and also to the user logged in to gcloud on my terminal (confirmed with gcloud auth
).
Where else am I supposed to grant the permission iam.serviceAccounts.get
?