Hello. Terraform user looking into Pulumi with azu...
# getting-started
t
Hello. Terraform user looking into Pulumi with azure/python. I am used to using outputs in terraform to connect to other resources together, for example I may spin up a VM or PaaS service and have it reach out and create a subnet on a VNET that is already in a Hub or Spoke. I will use the VNET ID/NAME via a data call to create the subnet on the VNET. Is there an equivalent to this in Pulumi using python?
b
you’re likely looking for stack references https://www.pulumi.com/learn/building-with-pulumi/stack-references/
b
the other part is getting already existing resources, for those you can use the
get_*
functions, which don't import the resource into the current project/stack, but gets all the properties. In your case the
get_subnet
https://www.pulumi.com/registry/packages/azure-native/api-docs/network/getsubnet/