capabilities.work

Copy Project IAM Policy

A 4-step recipe with Google Cloud Platform. We can help you get access.

Recipe · 4 steps

Copy Project IAM Policy

Copy IAM bindings from a source project onto a target project.

  1. Read the source project IAM policy to capture the bindings to copy.
  2. Read the target project IAM policy to capture its etag for safe replacement.
  3. Write the source bindings onto the target project, passing the target's etag for optimistic concurrency.
  4. Re-read the target project policy to confirm the copied bindings.
What you'll need to have ready
  • sourceResource: The source project resource, e.g. projects/11111.
  • targetResource: The target project resource, e.g. projects/22222.
For your developer

Arazzo workflow google-cloud-platform:copy-project-iam-policy, 4 operations: cloudresourcemanager.projects.getIamPolicy → cloudresourcemanager.projects.getIamPolicy → cloudresourcemanager.projects.setIamPolicy → cloudresourcemanager.projects.getIamPolicy. Specs on APIs.io.