When applying changes to kubernetes_manifest.karpenter_provisioner, the provider "provider["registry.terraform.io/hashicorp/kubernetes"]" produces an unexpected new value:
.object.spec.limits.resources["cpu"]: was cty.StringVal("1000"), but now cty.StringVal("1k").
This leads to inconsistent results, preventing the proper application of the manifest.
Hi @amitkyadav2203! This is happening because the Kubernetes API is adjusting it to an appropriate compatibility format based on what's given. I would recommend taking a look at the computer fields documentation here for more information. Thanks!
Terraform Version, Provider Version and Kubernetes Version
Description:
When applying changes to kubernetes_manifest.karpenter_provisioner, the provider "provider["registry.terraform.io/hashicorp/kubernetes"]" produces an unexpected new value: .object.spec.limits.resources["cpu"]: was cty.StringVal("1000"), but now cty.StringVal("1k").
This leads to inconsistent results, preventing the proper application of the manifest.
Steps to Reproduce:
Use the following configuration in Terraform:
hcl Copy code resource "kubernetes_manifest" "karpenter_provisioner" { manifest = { apiVersion = "karpenter.sh/v1alpha5" kind = "Provisioner" metadata = { name = "default" } spec = { ttlSecondsAfterEmpty = 60 ttlSecondsUntilExpired = 604800 limits = { resources = { cpu = "1000" # Specified as a string memory = "2000Gi" } } constraints = { instanceTypes = [ "m5.large", "m5.xlarge", "m5.2xlarge", "c5.large", "c5.xlarge" ] } } } } Apply the configuration using terraform apply.
Expected Behavior: The CPU value should remain 1000 without conversion to 1k.
Actual Behavior: The CPU value is converted from 1000 to 1k, causing an inconsistency.