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.