This message was deleted.
# general
s
This message was deleted.
l
I have done this with automation API to create a common VPC and resource group that is shared across stacks. Here's the
EnsureNetwork
function that makes sure the resources are available and deploys them if not: https://github.com/EvanBoyle/automation-api-examples/blob/main/vm_manager_azure/infra/deploy/deploy.go#L118-L178
b
You can do this just in typescript too
Copy code
let vpc = undefined

try {
  vpc = aws.ec2.getVPc()
} catch {
  vpc = new aws.ec2.vpc
}