https://pulumi.com logo
#general
Title
# general
c

cool-egg-852

04/08/2020, 3:59 PM
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

gentle-diamond-70147

04/08/2020, 4:18 PM
You can use
pulumi stack export --version 123
to traverse the history and then
jq
to look for the resources.
c

cool-egg-852

04/08/2020, 4:29 PM
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

gentle-diamond-70147

04/08/2020, 4:31 PM
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

cool-egg-852

04/08/2020, 4:32 PM
Maybe a flag then
--ignore-import-diffs
would make sense.