Hey folks, wondering does anyone know if it’s possible to specify an non-default AWS provider when using the CLI to import a list of resources via a JSON file?
At the moment I’m seeing that when I import existing infrastructure into a new stack, a default AWS provider is created. Then when I run my Pulumi code to then manage the resources, it tries to re-create everything due to the provider URN changing.
The solution I’ve found so far is to initialise the provider first, then write some automation that takes the provider URN and writes it to the
nameTable
in the import file. Wanted to check before I go any further this this, is there a solution that doesn’t involve pre-initialising the provider?
e
echoing-dinner-19531
04/16/2024, 1:44 PM
is there a solution that doesn’t involve pre-initialising the provider?
Not currently, something we've been thinking about but its tricky because import mostly assumes you can import given just an ID. But a provider doesn't really have an ID that you can look it up with.
c
cuddly-orange-36960
04/16/2024, 1:48 PM
Got it, so I should continue with what I’m doing?
• Run
pulumi up
with just the provider
• Get the provider URN from outputs
• Place provider URN into
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.