lemon-processor-10785
06/14/2022, 8:04 PMdef set_route_tables(subnetIds):
for subnetId in subnetIds:
# Get the current routeTable for the subnet. Pulumi creates a new table for each subnet via awsx in vpc creation
routeTable=aws.ec2.get_route_table(subnet_id=subnetId)
# Create the route to MongoDB Atlas
mongoRoute=aws.ec2.Route(env + "-mongoroute-" + subnetId,
route_table_id=routeTable.id,
destination_cidr_block=mongoContainer.results[0].atlasCidrBlock,
vpc_peering_connection_id=mongoPeering.connectionId,
)
vpc.private_subnet_ids.apply(lambda subnetIds: set_route_tables(subnetIds))
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