agreeable-hair-3465807/29/2021, 7:57 PM
and when to use the getresource function, e.g. https://www.pulumi.com/docs/reference/pkg/azure/network/getvirtualnetwork/#example-usage? I am not sure, when to use which of both.
bored-oyster-314707/29/2021, 8:15 PM
Get an existing VirtualNetwork resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.Which makes more sense when you see that the Get method is asking for a
that you gave the pulumi resource, so the name that it is known by in your pulumi state. So in that case the resource must already exist in your stack. While the GetResource reference says:
Use this data source to access information about an existing Virtual Network.So this will be making an API call to Azure to retrieve a resource that may or may not even be part of your pulumi stack.
agreeable-hair-3465807/30/2021, 8:06 AM
function to consume properties from a resource that was provisioned elsewhere.
bored-oyster-314707/30/2021, 12:59 PM