provider/aws: Wait until ALB is actually provisioned #11333
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is to bring ALBs in line with conventions we apply to most (hopefully all) other resources - which is that Terraform should always hand over resource only when it's actually ready.
Public ALBs need IGW
We had a bunch of tests creating basically useless ALBs - until now unnoticed - specifically public ALBs in VPCs w/out IGW - hence no internet access. The ALB state from API reflects this issue in a way that the ALB remains stuck in
provisioning
state if it has no IGW and is set to public.This is why these tests started to timeout - so I decided to either add IGW or make ALBs private to rectify that and test both cases.
I have also opened AWS support ticket in regards to confusing behaviour - I'd expect the ALB to reach
failed
state rather than stuck inprovisioning
.Test plan
Breaking change (?)
Creation of ALBs in some cases will (rightly) begin to time out for user as explained above, but the ALB remains in the state, hence I'd not treat that as BC. We just bring the error closer to the user.