Skip to content

Commit

Permalink
fix(fleet_app_operator_permissions): optional groups and users (#2044)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Aug 20, 2024
1 parent b1fb1b3 commit a5a67e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/simple_fleet_app_operator_permissions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module "permissions" {
fleet_project_id = var.fleet_project_id
scope_id = google_gke_hub_scope.scope.scope_id
users = ["${local.app_operator_id}@${var.fleet_project_id}.iam.gserviceaccount.com"]
groups = []
role = local.app_operator_role

depends_on = [
Expand Down
4 changes: 2 additions & 2 deletions modules/fleet-app-operator-permissions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ To deploy this config, run:
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| fleet\_project\_id | The project to which the Fleet belongs. | `string` | n/a | yes |
| 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 |
| 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 |
| role | The principals role for the Fleet Scope (`VIEW`/`EDIT`/`ADMIN`). | `string` | n/a | yes |
| scope\_id | The scope for which IAM and RBAC role bindings are created. | `string` | n/a | yes |
| 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 |
| 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 |

## Outputs

Expand Down
2 changes: 2 additions & 0 deletions modules/fleet-app-operator-permissions/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ variable "scope_id" {
variable "users" {
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]`."
type = list(string)
default = []
}

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

variable "role" {
Expand Down

0 comments on commit a5a67e5

Please sign in to comment.