-
Notifications
You must be signed in to change notification settings - Fork 1k
kubernetes_cluster_role_binding & kubernetes_role_binding adding namespace when subject kind is Group #710
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
Comments
If it helps I ran with log level set to
|
Same issue. Looks related with #713.
|
Same issue, same log as above when run with
|
Same issue, unwanted namespace attribute is present for Group kind. |
Hi. I discovered a work-around. Even though the documentation says that for kind: Group, namespace is a property that is not available. If you set namespace="" for kind: Group, then the resultant clusterrolebinding for kind: Group doesn't have namespace as a property, as it should. I'm using terraform v 0.12.28 Example: resource "kubernetes_cluster_role_binding" "cluster-superusers" { |
I confirm this also happens for terraform v0.13.5 |
The same happens when kind
output from the plan
my terraform informaiton. |
Still happening with the latest Kubernetes provider 2.0.2. Also confirming that the workaround works with specifying:
|
still happening with Kubernetes provider version = "2.5.1"
and |
Still happening here for provider version 2.8.0, and |
+1 |
@roeera Thanks for pitching in, but it's better to vote with 👍on the post since that gets tracked by GitHub and can be sorted on. so it's easier to prioritize :) |
I can't believe this still hasn't been fixed as it was reported almost 3 years ago. For the record the official docs have the following to say about setting the namespace incorrectly which should make this a high priority bug.
|
Issue still exists in provider |
Still exists... 2023... v2.16.1 |
Still found this issue in provider 2.17.0. |
Still exists in v2.22.0 |
Still exists in v.2.26.0 |
Still exists in v.2.32.0, I know, I know... |
OMG Still exists in v2.34.0, it’s almost 2025 |
are users still running into this bug? Reason for asking is this: #2633 (review) |
I abandoned Terraform a few years ago in favor of CDK and CloudFormation. This is a new chapter in my IT life. I really recommend CDK. |
@BBBmau the test on the PR you linked is using the FYI yes it is still an issue, see the comment directly above yours. |
It's now the 23rd of April 2025 :-) and this still exists in version 2.36.0 of the provider. the workaround works. |
Hi
When applying a clusterrolebinding or rolebinding where the subject kind is
Group
, there should not be a namespace as a group is not a namespaced resource.There's documentation here: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-examples
Terraform Version
Terraform v0.12.16
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Expected Behavior
The subject blocks of the role bindings should be created as per the config without a namespace.
Actual Behavior
The role bindings were created and the namespace field was added with a value of
default
.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: