Locally Pulumi uses the Azure CLI to authenticate to Azure, so it should create your resources in the subscription where your are currently logged in. If your resources are already created, the state contains the identifiers of the resources so I guess whatever the subscription you are currently logged in, pulumi can sucessfuly do a refresh (if your azure cli account has the permissions on both the subscriptions). At least that's how I understand it
a
agreeable-butcher-1638
02/12/2024, 3:09 PM
OK. I see. That makes sense. Possibly it's even at the stack level. Whenever a stack is created it is created for a particular subscription. So, even when creating new resources it uses the correct subscription.
a
adventurous-butcher-54166
02/13/2024, 6:47 PM
I've ran into problems before where I managed to deploy half the resources in another subscription because the wrong one was selected via az cli. Now I have
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.