-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Terraform Version, Provider Version and Kubernetes Version
Terraform version: 1.0.0
Kubernetes provider version: 2.3.2
Kubernetes version: 1.18 (EKS)
Affected Resource(s)
resource "kubernetes_cluster_role" "example" {
metadata {
name = "example"
}
aggregation_rule {
cluster_role_selectors {
match_labels = {
"rbac.authorization.k8s.io/aggregate-to-view" = "true"
}
}
cluster_role_selectors {
match_labels = {
"example.io/aggregregate-to-app" = "true"
}
}
}
}
Expected Behavior
A role with the following aggregation rule is created:
aggregationRule:
clusterRoleSelectors:
- matchLabels:
rbac.authorization.k8s.io/aggregate-to-view: 'true'
- matchLabels:
example.io/aggregregate-to-app: 'true'
Actual Behavior
The second cluster_role_selectors is ignored and only the first match_label rule is created (the same happens using match_expressions
)
aggregationRule:
clusterRoleSelectors:
- matchLabels:
rbac.authorization.k8s.io/aggregate-to-view: 'true'
References
aklemp, diversit, maikelvl, arnabmaji, gempesaw and 3 more