Is there a way to see what the diff is when you ge...
# general
Is there a way to see what the diff is when you get
Plan apply failed: inputs to import do not match the existing resource
pulumi preview --diff
I believe this is what I used when trying to figure out what input was being set to and that I needed to override it (Name in my case).
@cool-egg-852 when it can’t import, the details view will show you if you are interactively running the cli
Gotcha. I was doing
--skip-preview --yes
to reiterate quickly
Unfortunately it still gives the same error, even though the diff shows nothing
Sorry, correction, I added what the diff showed, it still shows a diff, and still gives the error
This happened to me a long time ago when I tried to import kubernetes resources.
Basically the import feature is a little half-baked.
From what I recall, I had to do trial and error until I got the configuration correct for pulumi to think there was nothing different.
In this case I have nothing to easily base it on because it’s not kubernetes
//cc @white-balloon-205 here
Basically however the diff is calculated is extremely buggy. It thinks there are differences when there are not, and doesn’t display the diff right either.
For example, in this case, vault UI shows
as the
, but
shows it as different even when setting it to
Basically what pulumi should be doing is fetching the resource as it is, and then outputting that.
Copy code
❯ vault read auth/github/config
Key             Value
---             -----
base_url        n/a
max_ttl         0s
organization    LinioIT
ttl             0s
However, even when setting the values to this, pulumi still thinks something is different.
I'm not sure I quite follow the specifics here. Have you run
pulumi refresh
? If you have made changes to Vault outside of Pulumi, and expect to see a diff relative to those changes you will need to do a
or pass
pulumi up
. But I can't tell exactly what the differences are between what's in Vault, what's in your state file and what's in your desired state, and what you are seeing that seems wrong relative to those three. If it is possible to summarize those in an issue, we can definitely look into it. Other than the fact that you would need to do a refresh if changes were made outside Pulumi, the diff should definitely be "correct". If it's not, that is a bug.
This is when importing a resource into pulumi
I already configured the vault before the provider existed
Now I’m trying to import the different resources
However, pulumi’s import is buggy and thinks there are differences but doesn’t show them.
To summarize, the issue is that pulumi doesn’t seem to show you what is actually missing, it just exits with an error that the import will fail. This is 100% useless because we have to play the guessing game as to what pulumi thinks the remote resource state is, and configure the code to match that.
I’m happy to jump on a call and share my screen to show you.
@cool-egg-852 running with
flag might help. It displays some of the json returns by the api's.
I already passed this by just recreating the remote resources via pulumi. Not what I wanted to do but it worked. I didn’t have time to wait for this to be solved.
And even with -d, it doesn’t solve the issue that pulumi is detecting differences it doesn’t output and show.
@cool-egg-852 or @broad-dog-22463 either of you able to open an issue with enough details to try to reproduce this?