sparse-intern-71089
05/23/2021, 8:31 AMfaint-whale-59078
05/23/2021, 8:45 AMvpc = aws.ec2.get_vpc(default=True)
print(vpc.arn)
...
happy-window-22449
05/23/2021, 9:21 AMhappy-window-22449
05/23/2021, 9:21 AMhappy-window-22449
05/23/2021, 9:23 AMhappy-window-22449
05/23/2021, 9:23 AMvpc = aws.ec2.get_vpc(default=True)
works when vpc = aws.ec2.DefaultVpc(f'default-vpc')
does nothappy-window-22449
05/23/2021, 9:23 AMfaint-whale-59078
05/23/2021, 9:38 AMfaint-whale-59078
05/23/2021, 9:40 AMfaint-whale-59078
05/23/2021, 9:41 AMThis is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.
faint-whale-59078
05/23/2021, 9:42 AMfaint-whale-59078
05/23/2021, 9:53 AMimport pulumi_aws as aws
vpc = aws.ec2.get_vpc(default=True)
subnet_ids = aws.ec2.get_subnet_ids(vpc_id=vpc.id)
print(subnet_ids.ids)
should output something similar to this:
['subnet-204bcd78', 'subnet-f66a7d91', 'subnet-22b1b06b']
happy-window-22449
05/24/2021, 7:01 AM