You have IAM roles defined in a development project and need the same roles in a new production project with minimal steps. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Use gcloud iam roles copy specifying the production project as the destination project..
Why this is the answer
The gcloud iam roles copy command is designed for this exact scenario, allowing you to duplicate custom IAM roles from one project to another efficiently. Specifying the production project as the destination ensures the roles are created where needed. Copying to an organization would make the roles available across all projects within that organization, which is not what the question asks for. Using 'create role from role' in the Cloud Console is a valid way to create a new custom role based on an existing one, but it's a manual process for each role, making it less efficient than the gcloud command for multiple roles. Manually selecting all permissions is the most time-consuming and error-prone method.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed