Open GeoffMillerAZ opened 11 months ago
Good point about reducing the "diff anxiety" @GeoffMillerAZ
Import kind of is a refresh, we use the same provider method (Read) for both. If a provider is returning one set of data for an import read, but then updating that on a refresh read that's a provider issue.
This is what I was told on the issue. So maybe this issue needs to be closed and new issues opened with each provider when diffs are found after an import? @Frassle , thoughts?
Hello!
Issue details
Perform a
pulumi refresh
automatically after doing a successful state import from terraform.After doing an import, I noticed that some resources showed diffs. So I decided to do a refresh. This was roughly the output:
pulumi import --from terraform terraform.tfstate
output from import omitted
pulumi refresh
This will not only validate the import to make sure it was successful, but also pull in any live configuration missing from the state file post conversion.
You will also need to add a
--skip-refresh
to thepulumi import --from
in case someone wants to do an import from a converter that doesn't want to do a refresh (for whatever reason).This will be help the conversion process because extra diffs in
pulumi up
will make it seem as though your Pulumi code that was converted from Terraform has diffs. By running a refresh, we reduce the diffs that are do to differences in the effect of the converted code.Affected area/feature