Hello :wave: Is there a parameter that can be set ...
# general
s
Hello šŸ‘‹ Is there a parameter that can be set to "force" Pulumi to import a resource even though the configuration of the resource does not match 100%? Context: https://github.com/pulumi/pulumi-auth0/issues/237 Because the "Get a User" API does not return the connection name, Pulumi always sees that attribute has a diff, and it can't be ignored because the "create a user" and the "update a user" API require that attribute. I was hoping the InvokeOptions class would accept a transformation that would allow to somehow inject the connection name even though the API does not return it but I couldn't find a way to do that.
l
Things I can think of that might work, though I've not tested any of them: ā€¢ You could try setting
ignoreChanges
on the connection name and seeing if this means that
pulumi preview
will accept the import as good. ā€¢ You could try exporting the state manually
pulumi ... stack export > stack.json
and manually editing the JSON to make connection names line up, before
stack import < modified-stack.json
and then running the preview. If you do this, definitely take a backup of the unmodified export first.
s
unfortunately adding the connection name to the ignore changes list leads to an error because the connection name is a required parameter šŸ˜ž
the
pulumi stack import
command has a
--force
parameter but that'd require doing the import outside of the code šŸ˜• I was hoping maybe a similar parameter would exist as part of the import-as-code logic