Skip to content

Commit d6528c7

Browse files
Update IAM v3 documentation for Principal Access Boundary Policies, and Policy Bindings. (#13072)
Co-authored-by: Chris Hawk <[email protected]>
1 parent 32fa743 commit d6528c7

4 files changed

+53
-22
lines changed

mmv1/products/iam3/FoldersPolicyBinding.yaml

+10-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
---
1515
name: 'FoldersPolicyBinding'
1616
api_resource_type_kind: PolicyBinding
17-
description: A policy binding to a folder
17+
description: |
18+
A policy binding to a folder. This is a Terraform resource, and maps to a policy binding resource in GCP.
1819
references:
1920
guides:
2021
'Apply a policy binding': 'https://cloud.google.com/iam/docs/principal-access-boundary-policies-create#create_binding'
@@ -44,14 +45,14 @@ async:
4445
include_project: true
4546
examples:
4647
- name: 'iam_folders_policy_binding'
47-
primary_resource_id: 'my-folder-binding'
48+
primary_resource_id: 'binding-for-all-folder-principals'
4849
test_env_vars:
4950
org_id: 'ORG_ID'
5051
vars:
5152
pab_policy_id: 'my-pab-policy'
52-
display_name: 'test folder binding'
53-
folder_binding_id: 'test-folder-binding'
54-
folder_name: 'test folder'
53+
display_name: 'binding for all principals in the folder'
54+
folder_binding_id: 'binding-for-all-folder-principals'
55+
folder_name: 'my folder'
5556
external_providers: ["time"]
5657
parameters:
5758
- name: 'folder'
@@ -108,8 +109,10 @@ properties:
108109
- name: 'principalSet'
109110
type: String
110111
description: |
111-
Required. Immutable. The resource name of the policy to be bound.
112-
The binding parent and policy must belong to the same Organization (or Project).
112+
Required. Immutable. Full Resource Name of the principal set used for principal access boundary policy bindings.
113+
Examples for each one of the following supported principal set types:
114+
* Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
115+
It must be parent by the policy binding's parent (the folder).
113116
immutable: true
114117
- name: 'policyKind'
115118
type: String

mmv1/products/iam3/OrganizationsPolicyBinding.yaml

+11-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
---
1515
name: 'OrganizationsPolicyBinding'
1616
api_resource_type_kind: PolicyBinding
17-
description: A policy binding to an organizations
17+
description: |
18+
A policy binding to an organization. This is a Terraform resource, and maps to a policy binding resource in GCP.
1819
references:
1920
guides:
2021
'Apply a policy binding': 'https://cloud.google.com/iam/docs/principal-access-boundary-policies-create#create_binding'
@@ -44,13 +45,13 @@ async:
4445
include_project: true
4546
examples:
4647
- name: 'iam_organizations_policy_binding'
47-
primary_resource_id: 'my-org-binding'
48+
primary_resource_id: 'binding-for-all-org-principals'
4849
test_env_vars:
4950
org_id: 'ORG_ID'
5051
vars:
5152
pab_policy_id: 'my-pab-policy'
52-
display_name: 'test org binding'
53-
org_binding_id: 'test-org-binding'
53+
display_name: 'binding for all principals in the Organization'
54+
org_binding_id: 'binding-for-all-org-principals'
5455
external_providers: ["time"]
5556
parameters:
5657
- name: 'organization'
@@ -107,8 +108,12 @@ properties:
107108
- name: 'principalSet'
108109
type: String
109110
description: |
110-
Required. Immutable. The resource name of the policy to be bound.
111-
The binding parent and policy must belong to the same Organization (or Project).
111+
Required. Immutable. Full Resource Name of the principal set used for principal access boundary policy bindings.
112+
Examples for each one of the following supported principal set types:
113+
* Organization `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
114+
* Workforce Identity: `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
115+
* Workspace Identity: `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
116+
It must be parent by the policy binding's parent (the organization).
112117
immutable: true
113118
- name: 'policyKind'
114119
type: String

mmv1/products/iam3/PrincipalAccessBoundaryPolicy.yaml

+20-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313

1414
---
1515
name: 'PrincipalAccessBoundaryPolicy'
16-
description: An IAM Principal Access Boundary Policy resource
16+
description: |
17+
An IAM Principal Access Boundary Policy resource. This resource has no effect on accesses until is bound to a target through policy bindings.
18+
You can see further documentation on policy bindings in:
19+
- [Organizations](/providers/hashicorp/google/latest/docs/resources/iam_organizations_policy_binding)
20+
- [Folders](/providers/hashicorp/google/latest/docs/resources/iam_folders_policy_binding)
21+
- [Projects](/providers/hashicorp/google/latest/docs/resources/iam_projects_policy_binding)
1722
references:
1823
guides:
1924
'Create and apply Principal Access Boundaries': 'https://cloud.google.com/iam/docs/principal-access-boundary-policies-create'
@@ -41,12 +46,24 @@ async:
4146
include_project: true
4247
examples:
4348
- name: 'iam_principal_access_boundary_policy'
49+
primary_resource_id: 'pab-policy-for-org'
50+
external_providers: ["time"]
51+
test_env_vars:
52+
org_id: 'ORG_ID'
53+
vars:
54+
display_name: 'PAB policy for Organization'
55+
pab_id: 'pab-policy-for-org'
56+
- name: 'iam_organizations_policy_binding'
4457
primary_resource_id: 'my-pab-policy'
58+
external_providers: ["time"]
4559
test_env_vars:
4660
org_id: 'ORG_ID'
4761
vars:
48-
display_name: 'test pab policy'
49-
pab_id: 'test-pab-policy'
62+
pab_policy_id: 'my-pab-policy'
63+
display_name: 'Binding for all principals in the Organization'
64+
org_binding_id: 'binding-for-all-org-principals'
65+
# This example is already used as a test in OrganizationsPolicyBinding
66+
exclude_test: true
5067
parameters:
5168
- name: 'organization'
5269
type: String

mmv1/products/iam3/ProjectsPolicyBinding.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
---
1515
name: 'ProjectsPolicyBinding'
1616
api_resource_type_kind: PolicyBinding
17-
description: A policy binding to a Project
17+
description: |
18+
A policy binding to a project. This is a Terraform resource, and maps to a policy binding resource in GCP.
1819
references:
1920
guides:
2021
'Apply a policy binding': 'https://cloud.google.com/iam/docs/principal-access-boundary-policies-create#create_binding'
@@ -43,14 +44,14 @@ async:
4344
resource_inside_response: true
4445
examples:
4546
- name: 'iam_projects_policy_binding'
46-
primary_resource_id: 'my-project-binding'
47+
primary_resource_id: 'binding-for-all-project-principals'
4748
external_providers: ["time"]
4849
test_env_vars:
4950
org_id: 'ORG_ID'
5051
vars:
5152
pab_policy_id: 'my-pab-policy'
52-
display_name: 'test project binding'
53-
project_binding_id: 'test-project-binding'
53+
display_name: 'binding for all principals in the project'
54+
project_binding_id: 'binding-for-all-project-principals'
5455
parameters:
5556
- name: 'location'
5657
type: String
@@ -99,8 +100,13 @@ properties:
99100
- name: 'principalSet'
100101
type: String
101102
description: |
102-
Required. Immutable. The resource name of the policy to be bound.
103-
The binding parent and policy must belong to the same Organization (or Project).
103+
Required. Immutable. Full Resource Name of the principal set used for principal access boundary policy bindings.
104+
Examples for each one of the following supported principal set types:
105+
* Project:
106+
* `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
107+
* `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
108+
* Workload Identity Pool: `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
109+
It must be parent by the policy binding's parent (the project).
104110
immutable: true
105111
- name: 'policyKind'
106112
type: String

0 commit comments

Comments
 (0)