Skip to content

fix(fleet_app_operator_permissions): optional groups and users #2044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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., `people@google.com`, `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., `people@google.com`, `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., `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)` | n/a | yes |
| 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 |

## 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., `person@google.com`, `principal://iam.googleapis.com/locations/global/workforcePools/my-pool/subject/person`, `serviceAccount:my-service-account@my-project.iam.gserviceaccount.com`."
type = list(string)
default = []
}

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

variable "role" {
Expand Down
Loading