This message was deleted.
# general
s
This message was deleted.
l
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
There is no error, its just not recognized on first run. the indexes are always the same
l
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
You are right actually. I had to add the NAT gateway to dependsOn. Thank you
👍 1