terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
kubernetes_manifest error while handling ClusterPolicies with more than 2 context variables
Terraform Version, Provider Version and Kubernetes Version
Terraform version: v1.10.5
Kubernetes provider version: 2.30.0_x5
Kubernetes version: v1.26.15-eks-2d5f260
Affected Resource(s)
- kubernetes_manifest
Panic Output
https://gist.github.com/danipaniii/3f7a59daae9fe881caa4bfad05becc2c
Steps to Reproduce
- Create a ClusterPolicy with "kubernetes_manifest" with 2 or more context variables -> https://gist.github.com/danipaniii/78c9a38860849cc7ba9401d4ef546766
- Run terraform plan
- Error will be shown
Expected Behavior
The terraform plan should have executed without errors, just as it does with using just one context variable.
Actual Behavior
The error message shown in the gist I shared.
Important Factoids
- VPA needs to be installed on the cluster
- I tested the kubernetes_manifest resource by removing one variable and keeping the other and the other way around. It worked both times, as long as there is only one context variable.
- Applying the ClusterPolicy manually via kubectl results in no errors, eventhough I have two context variables
- Applying the ClusterPolicy via null_resource also works fine without errors, eventhough I have two context variables
- I tried creating the kubernetes_manifest in different ways, also using a template file, but because there are two context variables, the error appears
References
Did not find any
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment