hardgcloud

Grant a service account the Storage Admin role on a project

command

gcloud projects add-iam-policy-binding PROJECT_ID --member serviceAccount:SA_EMAIL --role roles/storage.admin

also accepted

gcloud projects add-iam-policy-bindinggcloud projects add-iam-policy-binding PROJECT_ID --member serviceAccount

Command breakdown

Part of the Google Cloud CLI (gcloud) — IAM & Service Accounts category.

gcloudprojectsadd-iam-policy-bindingPROJECT_ID--memberserviceAccount:SA_EMAIL--roleroles/storage.admin
FlagPurpose
--memberBoolean flag
--roleBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →