← IAM165 / 640
easygcloud

Create a custom IAM role from a YAML definition file

command

gcloud iam roles create devReadRole --project=my-project --file=role-definition.yaml

Command breakdown

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

gcloudiamrolescreatedevReadRole--project=my-project--file=role-definition.yaml
FlagPurpose
--projectSet to: my-project
--fileSet to: role-definition.yaml

Test your recall — not just your reading.

Practice with interactive quiz →