Skip to content

Commit a5a67e5

Browse files
authored
fix(fleet_app_operator_permissions): optional groups and users (#2044)
1 parent b1fb1b3 commit a5a67e5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

examples/simple_fleet_app_operator_permissions/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ module "permissions" {
4040
fleet_project_id = var.fleet_project_id
4141
scope_id = google_gke_hub_scope.scope.scope_id
4242
users = ["${local.app_operator_id}@${var.fleet_project_id}.iam.gserviceaccount.com"]
43-
groups = []
4443
role = local.app_operator_role
4544

4645
depends_on = [

modules/fleet-app-operator-permissions/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ To deploy this config, run:
2929
| Name | Description | Type | Default | Required |
3030
|------|-------------|------|---------|:--------:|
3131
| fleet\_project\_id | The project to which the Fleet belongs. | `string` | n/a | yes |
32-
| groups | The list of app operator group principals, e.g., `[email protected]`, `principalSet://iam.googleapis.com/locations/global/workforcePools/my-pool/group/people`. | `list(string)` | n/a | yes |
32+
| groups | The list of app operator group principals, e.g., `[email protected]`, `principalSet://iam.googleapis.com/locations/global/workforcePools/my-pool/group/people`. | `list(string)` | `[]` | no |
3333
| role | The principals role for the Fleet Scope (`VIEW`/`EDIT`/`ADMIN`). | `string` | n/a | yes |
3434
| scope\_id | The scope for which IAM and RBAC role bindings are created. | `string` | n/a | yes |
35-
| users | The list of app operator user principals, e.g., `[email protected]`, `principal://iam.googleapis.com/locations/global/workforcePools/my-pool/subject/person`, `serviceAccount:[email protected]`. | `list(string)` | n/a | yes |
35+
| users | The list of app operator user principals, e.g., `[email protected]`, `principal://iam.googleapis.com/locations/global/workforcePools/my-pool/subject/person`, `serviceAccount:[email protected]`. | `list(string)` | `[]` | no |
3636

3737
## Outputs
3838

modules/fleet-app-operator-permissions/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ variable "scope_id" {
2727
variable "users" {
2828
description = "The list of app operator user principals, e.g., `[email protected]`, `principal://iam.googleapis.com/locations/global/workforcePools/my-pool/subject/person`, `serviceAccount:[email protected]`."
2929
type = list(string)
30+
default = []
3031
}
3132

3233
variable "groups" {
3334
description = "The list of app operator group principals, e.g., `[email protected]`, `principalSet://iam.googleapis.com/locations/global/workforcePools/my-pool/group/people`."
3435
type = list(string)
36+
default = []
3537
}
3638

3739
variable "role" {

0 commit comments

Comments
 (0)