Hey guys! Just wondering if it's possible to impo...
# dotnet
a
Hey guys! Just wondering if it's possible to import resources from a different subscription? We have a CI pipeline that stands up infrastructure for each development branch and then deploys to that infrastructure to our 'dev' subscription. We also have a 'global' subscription that hosts a KeyVault to store all of our applications SSL certificates. I was hoping using the
KeyVault.Get()
method would work, since it requires the full resource ID (including the subscription segment). But when I try that, it returns "does not exist". Similarly, I've also tried the
pulumi import
and that won't work either (I would have to switch subscriptions before running it, and then switch back after which results in the same "does not exist" message. I thought I'd check on here before heading back to the drawing board as I fear I may have misunderstood the import capabilities!
f
I am not an expert by any means, but I've noticed that Pulumi is limited by your underlying
az login
. Perhaps try logging from CLI into both subscriptions, then running your Pulumi code
a
My login has access to both subscriptions but you can only
set
one as the default. It seems like Pulumi can only use that default subscription.
a
@tall-librarian-49374 - 'Explicit Provider Configuration' looks like it may be exactly what I'm after! https://www.pulumi.com/docs/reference/pkg/azure/provider/ Thanks for your help!