IAM Bindings on Service Accounts
Also read Best Practices around GCP Service Accounts
gcloud <resourceType> add-iam-policy-binding <resourceName> --member=<accountToGrantOnTheResource> --role=<roleToGrantOnTheResource>
gCloud IAM
gcloud iam service-accounts add-iam-policy-binding \
[email protected] \
--member='serviceAccount:[email protected]' \
--role='roles/editor'
gCloud projects add-iam-policy-binding
add IAM policy binding for a project
https://cloud.google.com/sdk/gcloud/reference/projects/add-iam-policy-binding
gCloud Organizations
To add an IAM policy binding for the role of 'roles/editor' to the service account '[email protected]', run:
gcloud projects add-iam-policy-binding \
[email protected] \
--member='serviceAccount:[email protected]' \
--role='roles/editor'
Leave a Reply