terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
Autogenerated documentation is misleading.
Affected Resource(s)
- kubernetes_cluster_role
- kubernetes_role
Terraform sample
resource "kubernetes_cluster_role" "some-name" {
metadata {
name = "some-name"
}
rule {
api_groups = ["kafka.strimzi.io"]
resources = ["ResourceAll"]
verbs = ["VerbAll"]
}
}
Expected Behavior
ResourceAll
and VerbAll
should represent ALL resources and verbs aka *
like documented here: https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role#resources
Actual Behavior
Grants access to the string literal of ResourceAll
and/or VerbAll
instead of expand to *
. The issue is that the documentation is autogenerated from https://github.com/apprenda-kismatic/kubernetes-rbac/blob/master/api/types.go#L38 which is valid for programming but not for terraform and text based manifests.
Hello! Thank you for opening this issue. We should fix the documentation for this.
It has actually been fixed in the latest Kubernetes Documentation: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#policyrule-v1-rbac-authorization-k8s-io
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.