← IAM203 / 640
hardgcloud

Create a custom IAM role in a project from a YAML permissions file

command

gcloud iam roles create ROLE_ID --project PROJECT_ID --file YAML_FILE

also accepted

gcloud iam roles create

Command breakdown

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

gcloudiamrolescreateROLE_ID--projectPROJECT_ID--fileYAML_FILE
FlagPurpose
--projectBoolean flag
--fileBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →