The only way I've found to do this is to export the stack, edit the provider by hand, and import the stack.
little-cartoon-10569
05/19/2021, 11:26 PM
And you need to have the new provider defined (and possibly in use?) before exporting, so that you can copy its URN to the resources you want to update.
a
ambitious-father-68746
05/19/2021, 11:43 PM
Good call, that was what I thought of doing as well. Thanks!
s
sticky-bear-14421
05/20/2021, 6:55 AM
Is there an option to import the existing resources with the other provider? Would save you from editing the stack if such an option exists
l
little-cartoon-10569
05/20/2021, 7:59 PM
Yes,
pulumi import
has a
--provider
parameter. You'd have to remove the existing resource from state first, which is easy unless you have lots of dependencies on it
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.