Hard1 markMultiple Choice
GCP ACE · Question 43 · Domain 5.1: Managing Identity and Access Management (IAM)
You need to create a Custom IAM Role because none of the predefined roles exactly match your security requirements. You want to create this role using a YAML file that defines the title, description, and included permissions.
Which command should you use to create the role at the project level?
You need to create a Custom IAM Role because none of the predefined roles exactly match your security requirements. You want to create this role using a YAML file that defines the title, description, and included permissions.
Which command should you use to create the role at the project level?
Answer options:
A.
gcloud iam roles create [ROLE_ID] --project=[PROJECT_ID] --file=[YAML_FILE]
B.
gcloud projects add-iam-policy-binding [PROJECT_ID] --role=[YAML_FILE]
C.
kubectl apply -f [YAML_FILE]
D.
gcloud iam custom-roles apply [YAML_FILE]
How to approach this question
Identify the command for creating custom IAM roles.
Full Answer
A.gcloud iam roles create [ROLE_ID] --project=[PROJECT_ID] --file=[YAML_FILE]✓ Correct
To create a custom IAM role, you use the `gcloud iam roles create` command. You can specify the role properties directly via flags, or pass a YAML/JSON file containing the role definition using the `--file` flag. You must also specify whether the role is created at the `--project` or `--organization` level.
Common mistakes
Confusing role creation (`roles create`) with role assignment (`add-iam-policy-binding`).
Practice the full GCP Associate Cloud Engineer Practice Exam 4
50 questions · hints · full answers · grading
More questions from this exam
Q01You have recently joined a new team and need to set up a new Google Cloud project for a developme...EasyQ02Your company uses Google Workspace. You need to grant a new developer, Alice, the ability to view...MediumQ03You have created a new GCP project and want to deploy a Compute Engine instance. However, when yo...MediumQ04Your startup has a strict monthly cloud budget of $500. You want to be notified via email when yo...EasyQ05Your finance team wants to analyze Google Cloud costs using standard SQL and build custom dashboa...Medium
Expert