Is there an easy way to see when a resource was lo...
# general
c
Is there an easy way to see when a resource was lost from the statefile? I lost a few important resources and can’t seem to figure out when it happened.
Somehow 2 resources got dropped though they are in the code. I’m trying to import them, but one is failing. The
ClusterRoleBinding
says there are diffs in the input, but I can’t see the diff
It says the
roleRef
and
subjects
are different in
pulumi up
. However, they are the same. It’s showing it as if those don’t exist upstream. So I can’t import it because pulumi thinks there is a diff that there is not
g
You can use
pulumi stack export --version 123
to traverse the history and then
jq
to look for the resources.
c
Thanks. I ended up copying it from another stack and then doing a refresh. I’m not sure if this is a known bug or not though. But importing is definitely a pain point with pulumi.
It often thinks there are differences, and even then, it shouldn’t matter if there are.
It’s an import, it should import exactly as the resource is, and let
up
make any changes.
g
I believe this was an intentional design - to require the code and imported state to match. To protected against unintended or accidental updates or destroys. Would you mind opening an issue describing the behavior you'd like - https://github.com/pulumi/pulumi/issues/new? I can see value in supporting both ways.
c
Maybe a flag then
--ignore-import-diffs
would make sense.