-
Notifications
You must be signed in to change notification settings - Fork 264
aws flake aws_nat_gateway.nat_gw[n]: index n out of range #1246
aws flake aws_nat_gateway.nat_gw[n]: index n out of range #1246
Comments
CI jenkins log, filtered by the relationship between
Noteful observation. While the first two EIPs (
I'll have look in terraform, maybe there are different code paths for the creation events above. |
Another noteful observartion: TF doesnt' even start (yet?) to create |
Final investigation result: TF is absolutely happy, if you don't set any ID for a resource you created. In that case it also won't show up in the state file, it simply doesn't "exist" from a graph perspective and hence provokes the So searching through the code path I found exactly one very suspicious code point, where Iff AWS returns one of the above errors, all of the above Jenkins logs make perfect sense. After discussing with @alexsomesan reading the EIP after creating it should be retry-able, because a read call immediately after a create call does not necessarily return valid EIPs yet, when the change is propagated inside the AWS control plane. The code [1] should be implemented in a retry-able fashion to be bullet-proof. |
Great stuff! Will you make that a PR upstream? |
@Quentin-M yes, once we verify on #1247 that we got rid of this very flake, I'll definitely push it upstream. |
@s-urbaniak this is solved by your flake-resistant fork, right? Can we close or are we tracking upstream? |
@squat yes, this is solved in the fork. Nevertheless I would suggest to keep this open until the upstream PR [1] is not merged. |
upstream got merged, hence closing! |
Reported in #1054 (comment)
The text was updated successfully, but these errors were encountered: