Difference between revisions of "Terraform resource: google project iam policy"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
google_project_iam_policy | google_project_iam_policy | ||
+ | |||
+ | <pre> | ||
+ | resource "google_project_iam_policy" "project" { | ||
+ | project = "your-project-id" | ||
+ | policy_data = data.google_iam_policy.admin.policy_data | ||
+ | } | ||
+ | |||
+ | data "google_iam_policy" "admin" { | ||
+ | binding { | ||
+ | role = "roles/editor" | ||
+ | |||
+ | members = [ | ||
+ | "user:[email protected]", | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
Revision as of 08:20, 25 October 2024
google_project_iam_policy
resource "google_project_iam_policy" "project" { project = "your-project-id" policy_data = data.google_iam_policy.admin.policy_data } data "google_iam_policy" "admin" { binding { role = "roles/editor" members = [ "user:[email protected]", ] } }
See also
Advertising: