What error? And aside: it looks like you are creating routes in a loop. If the order of routes in
this.privateRouteTables
changes, then this code will destroy and recreate functionally identical routes. You might be better off having maps of tables, instead of indexed lists.
v
victorious-dusk-75271
08/10/2022, 11:51 PM
There is no error, its just not recognized on first run. the indexes are always the same
l
little-cartoon-10569
08/11/2022, 12:12 AM
Are any of the values not present on the first run? Are the arrays set up after this line of code? In particular, I note that the route's routeTableId is coming form an array item, but the parent property is come from a variable, even the two things are presumably pointing at the same thing.
And if the NAT gateway is still being prepared and isn't ready for routes (I have no idea how long before they can be used in route tables.. hopefully it's immediately?), maybe that would prevent the route from being created?
v
victorious-dusk-75271
08/11/2022, 2:52 AM
You are right actually. I had to add the NAT gateway to dependsOn. Thank you
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.