github.com/simonswine/terraform@v0.9.0-beta2/website/source/docs/providers/google/r/google_project_iam_policy.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_project_iam_policy" 4 sidebar_current: "docs-google-project-iam-policy" 5 description: |- 6 Allows management of an IAM policy for a Google Cloud Platform project. 7 --- 8 9 # google\_project\_iam\_policy 10 11 Allows creation and management of an IAM policy for an existing Google Cloud 12 Platform project. 13 14 ## Example Usage 15 16 ```js 17 resource "google_project_iam_policy" "project" { 18 project = "your-project-id" 19 policy_data = "${data.google_iam_policy.admin.policy_data}" 20 } 21 22 data "google_iam_policy" "admin" { 23 binding { 24 role = "roles/editor" 25 26 members = [ 27 "user:jane@example.com", 28 ] 29 } 30 } 31 ``` 32 33 ## Argument Reference 34 35 The following arguments are supported: 36 37 * `project` - (Required) The project ID. 38 Changing this forces a new project to be created. 39 40 * `policy_data` - (Required) The `google_iam_policy` data source that represents 41 the IAM policy that will be applied to the project. The policy will be 42 merged with any existing policy applied to the project. 43 44 Changing this updates the policy. 45 46 Deleting this removes the policy, but leaves the original project policy 47 intact. If there are overlapping `binding` entries between the original 48 project policy and the data source policy, they will be removed. 49 50 * `authoritative` - (Optional) A boolean value indicating if this policy 51 should overwrite any existing IAM policy on the project. When set to true, 52 **any policies not in your config file will be removed**. This can **lock 53 you out** of your project until an Organization Administrator grants you 54 access again, so please exercise caution. If this argument is `true` and you 55 want to delete the resource, you must set the `disable_project` argument to 56 `true`, acknowledging that the project will be inaccessible to anyone but the 57 Organization Admins, as it will no longer have an IAM policy. 58 59 * `disable_project` - (Optional) A boolean value that must be set to `true` 60 if you want to delete a `google_project_iam_policy` that is authoritative. 61 62 ## Attributes Reference 63 64 In addition to the arguments listed above, the following computed attributes are 65 exported: 66 67 * `etag` - (Computed) The etag of the project's IAM policy. 68 69 * `restore_policy` - (Computed) The IAM policy that will be resotred when a 70 non-authoritative policy resource is deleted.