Hi. How do you use existing Azure resources from y...
# azure
Hi. How do you use existing Azure resources from your Pulumi program. In my context I would like to create the resource group that will contain my resources outside of my pulumi stack. The aim is to to the development team Contributor permissions but only on the resource group I created and not on the whole subscription. I have read about Resource getters in the documentation but it seems very specific to AWS. I also found this method on the docs I don't know if it's what I should use. If you have other suggestions, other ways of doing these kinds of things I am listening.
Anyone knows how to solve that ? @tall-librarian-49374?
@millions-journalist-34868 you typically do this using Invoke calls.
Here’s one example from my code (string values obscured)
This example gets a reference to an existing KeyVault instance, that lives in a resource group in another subscription.
Then you can simply use
to refer to this vault, as an input, when creating other resources.
If your other resource is in the same subscription as your deployment is targeting, you can skip the
argument and the
Hope that helps.
That's awesome. Exatly what I was looking for. I will try that, thanks @powerful-football-81694!
No problem