terraform-provider-kubernetes-alpha icon indicating copy to clipboard operation
terraform-provider-kubernetes-alpha copied to clipboard

Recreate resource if manifest.metadata.name changed

Open ivanzolotuhin opened this issue 2 years ago • 0 comments

Description

I believe resource should be recreated if manifest.metadata.name changed or at least I should be able to set this behaviour somehow. There are some custom CRDs which should be recreated. I am trying to provision AWS ALB TargetGroupBinding CRD. The problem that this resource can only be deleted first and then recreated if I change associated target group. My idea was to give new manifest.metadata.name by adding hash value from AWS ALB TargetGroup ARN. Expected behaviour that Terraform will offer RECREATE of resource instead of modification, because it is impossible to modify this in K8S. Object names are immutable in Kubernetes.

ivanzolotuhin avatar Aug 09 '21 16:08 ivanzolotuhin