no plan generated with:
Terraform v0.12.26
+ provider.kubernetes v1.12.0
plan to replace all Deployments generated with:
Terraform v0.12.26
+ provider.kubernetes v1.13.1
resource "kubernetes_deployment" "this" {
metadata {
name = "deployment-name"
}
spec {
template {
spec {
container {
# ...
volume_mount {
mount_path = "/tmp"
name = "temp-vol"
}
}
volume {
name = "temp-vol"
empty_dir {}
}
}
}
}
}
After upgrading from v1.12.0 to v1.13.1, there should be no plan generated as the configuration has not changed.
After upgrading from v1.12.0 to v1.13.1, the following plan was generated:
# kubernetes_deployment.this must be replaced
-/+ resource "kubernetes_deployment" "this" {
...
~ volume {
name = "temp-vol"
~ empty_dir {
+ size_limit = "0" # forces replacement
}
}
...
kubernetes provider version constraint to "~> 1.12.0" if you don't already have it, and run terraform initkubernetes_deployment, with an empty_dir volume with no size_limitterraform apply to create the Deploymentterraform plan if you like, to validate that there's no plan generatedterraform init againterraform plan to validate that the Deployment now requires replacementUpgrading to a non-major provider version should be backwards-compatible, and not cause resources to be replaced without a config change.
Probably caused by either #912 or #983
Of note: another recent occurrence of this issue was https://github.com/hashicorp/terraform-provider-kubernetes/pull/916#issuecomment-666174449 (although that one didn't result in replacements).
This is indeed an issue. Sorry that it slipped through.
A fix is in review already (https://github.com/hashicorp/terraform-provider-kubernetes/pull/985).
Until a new release is cut, you can work around the issue by setting size_limit = "" in config. After the fix is rolled out, the empty value will be ignored by provider entirely.
when is the next release scheduled?
@llamahunter we have one queued up next week, note that Monday is a holiday in the US/Canada
so... the latest provider generates an error if you did the workaround suggested in https://github.com/hashicorp/terraform-provider-kubernetes/issues/984#issuecomment-686615371
Error: spec.0.template.0.spec.0.volume.0.empty_dir.0.size_limit. : quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!