What is the best way to resolve state differences ...
# general
s
What is the best way to resolve state differences in a Pulumi stack when changes happen outside Pulumi? For instance a cluster upgrade by a cloud provider? Now Pulumi wants to replace all my Kubernetes resources provisioned by Pulumi because of differences between what it thinks is there and what is actually there. Also
pulumi refresh
doesn't appear to pick up these changes.
e
Are these resources from the kubernetes provider? A refresh should reconcile state differences, and if it's not that's probably a provider bug. Although I know k8s has some specialness with managed vs unmanaged fields.
m
Not sure if it's the solution in your case, but if you had to make changes to your provider's kubeconfig and now Pulumi tries to replace everything associated with this provider, have a look at https://www.pulumi.com/registry/packages/kubernetes/api-docs/provider/#cluster_identifier_python, which solves the issue described in https://github.com/pulumi/pulumi-kubernetes/issues/2745.