https://pulumi.com logo
#getting-started
Title
# getting-started
t

thankful-rain-36264

10/18/2023, 9:38 PM
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

billowy-army-68599

10/18/2023, 9:48 PM
you’re likely looking for stack references https://www.pulumi.com/learn/building-with-pulumi/stack-references/
b

bumpy-glass-30283

10/22/2023, 7:44 AM
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/