Your enterprise organization needs to author, test, and release a custom IAM role at the organization level using a declarative definition. Place the operational steps in the correct sequential order to create, evaluate, and promote the custom IAM role using the gcloud CLI following Google Cloud best practices.
- 1Draft a local YAML definition file specifying the role title, description, required permissions, and set the launchStage attribute to ALPHA.
- 2Execute gcloud iam roles create using the --organization flag and referencing the YAML file via the --file parameter.
- 3Grant the new organization-level custom role to a test service account on a staging project using gcloud projects add-iam-policy-binding to validate permission behavior.
- 4Modify the launchStage attribute to GA in the YAML file and run gcloud iam roles update with the --organization and --file flags.
Answer
The correct sequence begins with drafting the local YAML role definition file with launchStage set to ALPHA, followed by creating the role at the organization level with gcloud iam roles create, testing the role assignment on a project via gcloud projects add-iam-policy-binding, and finally updating the role's launch stage to GA via gcloud iam roles update.
Declarative custom IAM role creation follows a structured lifecycle: defining the specification in YAML with an initial ALPHA stage, instantiating the role in GCP using gcloud iam roles create, testing permission effectiveness by binding the role to a test principal, and finally updating the role's launch stage to GA using gcloud iam roles update.
Step-by-Step Solution
Key Concept
Custom IAM Role Lifecycle and Declarative Management via gcloud CLI