You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alter manifest.metadata.name for kubernetes_manifest resource
terraform apply
Expected Behavior
Terraform will perform the following actions:# kubernetes_manifest.this["0"] must be replaced-/+resource"kubernetes_manifest""this" {
~ manifest={
~ metadata = {
~ name ="redis-infra-prod-monitoring-node-redis-sentry-4"->"redis-infra-prod-monitoring-node-redis-sentry-5"# forces replacement
Actual Behavior
Terraform will perform the following actions:# kubernetes_manifest.this["0"] will be updated in-place
~ resource"kubernetes_manifest""this" {
~ manifest={
~ metadata = {
~ name ="redis-infra-prod-monitoring-node-redis-sentry-4"->"redis-infra-prod-monitoring-node-redis-sentry-5"
which leads to the creation of an additional resource with the new name and complete removal of an original resource from the Terraform state but not K8s (it will be completely ignored after terraform apply as it never exists).
Vlad1mir-D
changed the title
Recreate kubernetes_manifest resource when manifest.metadata.name changed
Recreate kubernetes_manifest resource when manifest.metadata.name changed
Nov 30, 2021
A generic way to force recreation when certain attributes are changed (with immutable attributes in metadata included by default) would be useful. Custom resources often have immutable attributes too, and currently if you want to change them you have to taint the resource to get the provider to recreate it.
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/Vlad1mir-D/c39b0031cc6cbad7492e2916554bf646
Steps to Reproduce
manifest.metadata.name
forkubernetes_manifest
resourceterraform apply
Expected Behavior
Actual Behavior
which leads to the creation of an additional resource with the new name and complete removal of an original resource from the Terraform state but not K8s (it will be completely ignored after
terraform apply
as it never exists).Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: