16
16
# ----------------------------------------------------------------------------
17
17
subcategory : " Cloud IAM"
18
18
description : |-
19
- A policy binding to a folder
19
+ A policy binding to a folder.
20
20
---
21
21
22
22
# google_iam_folders_policy_binding
23
23
24
- A policy binding to a folder
24
+ A policy binding to a folder. This is a Terraform resource, and maps to a policy binding resource in GCP.
25
25
26
26
27
27
To get more information about FoldersPolicyBinding, see:
@@ -37,12 +37,12 @@ To get more information about FoldersPolicyBinding, see:
37
37
resource "google_iam_principal_access_boundary_policy" "pab_policy" {
38
38
organization = "123456789"
39
39
location = "global"
40
- display_name = "test folder binding "
40
+ display_name = "binding for all principals in the folder "
41
41
principal_access_boundary_policy_id = "my-pab-policy"
42
42
}
43
43
44
44
resource "google_folder" "folder" {
45
- display_name = "test folder"
45
+ display_name = "my folder"
46
46
parent = "organizations/123456789"
47
47
deletion_protection = false
48
48
}
@@ -52,12 +52,12 @@ resource "time_sleep" "wait_120s" {
52
52
create_duration = "120s"
53
53
}
54
54
55
- resource "google_iam_folders_policy_binding" "my- folder-binding " {
55
+ resource "google_iam_folders_policy_binding" "binding-for-all- folder-principals " {
56
56
folder = google_folder.folder.folder_id
57
57
location = "global"
58
- display_name = "test folder binding "
58
+ display_name = "binding for all principals in the folder "
59
59
policy_kind = "PRINCIPAL_ACCESS_BOUNDARY"
60
- policy_binding_id = "test- folder-binding "
60
+ policy_binding_id = "binding-for-all- folder-principals "
61
61
policy = "organizations/123456789/locations/global/principalAccessBoundaryPolicies/${google_iam_principal_access_boundary_policy.pab_policy.principal_access_boundary_policy_id}"
62
62
target {
63
63
principal_set = "//cloudresourcemanager.googleapis.com/folders/${google_folder.folder.folder_id}"
@@ -97,8 +97,10 @@ The following arguments are supported:
97
97
98
98
* ` principal_set ` -
99
99
(Optional)
100
- Required. Immutable. The resource name of the policy to be bound.
101
- The binding parent and policy must belong to the same Organization (or Project).
100
+ Required. Immutable. Full Resource Name of the principal set used for principal access boundary policy bindings.
101
+ Examples for each one of the following supported principal set types:
102
+ * Folder: ` //cloudresourcemanager.googleapis.com/folders/FOLDER_ID `
103
+ It must be parent by the policy binding's parent (the folder).
102
104
103
105
- - -
104
106
0 commit comments