sparse-intern-71089
09/29/2022, 7:18 AMbrainy-beach-36627
09/29/2022, 9:01 AMaws.ec2.get_subnets(
filters=[
aws.ec2.GetSubnetsFilterArgs(name="vpc-id", values=[vpc.id]),
aws.ec2.GetSubnetsFilterArgs(
name="availability-zone", values=availability_zones
),
aws.ec2.GetSubnetsFilterArgs(name=f"tag:{tag_key}", values=[tag_value]),
],
opts=pulumi.InvokeOptions(provider=provider),
)
With the get_subnets function, you can retrieve subnets thanks to different filters (such as vpc-id, az, and tags in my case)enough-table-42729
09/29/2022, 11:50 AMmap-public-ip-on-launch
so this solves my problem.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by