You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/fleet-app-operator-permissions/README.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Terrafrom Module for Fleet App Operator Permissions
1
+
# Terraform Module for Fleet App Operator Permissions
2
2
3
3
This module bundles different permissions (IAM and RBAC Role Bindings) required for [Fleet team management](https://cloud.google.com/kubernetes-engine/fleet-management/docs/team-management). A platform admin can use this module to set up permissions for an app operator (user or group) in a team--including usage of Fleet Scopes, Connect Gateway, logging, and metrics--based on predefined roles (VIEW, EDIT, ADMIN).
| custom\_role | The principal's role for the Fleet Scope which is a custom Kubernetes ClusterRole. Either a predefined role or a custom role should be set |`string`|`null`| no |
31
43
| fleet\_project\_id | The project to which the Fleet belongs. |`string`| n/a | yes |
32
44
| groups | The list of app operator group principals, e.g., `people@google.com`, `principalSet://iam.googleapis.com/locations/global/workforcePools/my-pool/group/people`. |`list(string)`|`[]`| no |
33
-
| role | The principals role for the Fleet Scope (`VIEW`/`EDIT`/`ADMIN`). |`string`|n/a|yes|
45
+
| role | The principal's predefined role for the Fleet Scope (`VIEW`/`EDIT`/`ADMIN`). Either a predefined role or a custom role should be set |`string`|`null`|no|
34
46
| scope\_id | The scope for which IAM and RBAC role bindings are created. |`string`| n/a | yes |
35
47
| users | The list of app operator user principals, e.g., `person@google.com`, `principal://iam.googleapis.com/locations/global/workforcePools/my-pool/subject/person`, `serviceAccount:my-service-account@my-project.iam.gserviceaccount.com`. |`list(string)`|`[]`| no |
description: The principals role for the Fleet Scope (`VIEW`/`EDIT`/`ADMIN`).
142
+
description: The principal's predefined role for the Fleet Scope (`VIEW`/`EDIT`/`ADMIN`). Either a predefined role or a custom role should be set
143
+
varType: string
144
+
- name: custom_role
145
+
description: The principal's role for the Fleet Scope which is a custom Kubernetes ClusterRole. Either a predefined role or a custom role should be set
143
146
varType: string
144
-
required: true
145
147
outputs:
146
148
- name: fleet_project_id
147
149
description: The project to which the Fleet belongs.
error_message="Allowed values for role are VIEW, EDIT, ADMIN, or null."
45
45
}
46
+
default=null
47
+
}
48
+
49
+
variable"custom_role" {
50
+
description="The principal's role for the Fleet Scope which is a custom Kubernetes ClusterRole. Either a predefined role or a custom role should be set"
assert.Equal(strings.Contains(scopeRrbList, appOperatorEmail), true, "app operator email should be in the list of Scope RBAC Role Bindings")
54
+
assert.Equal(strings.Contains(scopeRrbList, customAppOperatorEmail), true, "custom app operator email should be in the list of Scope RBAC Role Bindings")
assert.Equal(strings.Contains(customProjectIam, customProjectLevelRole), true, "custom app operator Scope role should be in the project IAM policy")
70
+
assert.Equal(strings.Contains(customProjectIam, logViewRole), true, "custom app operator log view role should be in the project IAM policy")
71
+
assert.Equal(strings.Contains(customProjectIam, logViewContainerBucket), true, "custom app operator log view container bucket should be in the project IAM policy")
72
+
assert.Equal(strings.Contains(customProjectIam, logViewPodBucket), true, "custom app operator log view pod bucket should be in the project IAM policy")
0 commit comments