Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Wait until ALB is actually provisioned #11333

Merged
merged 2 commits into from
Jan 23, 2017
Merged

provider/aws: Wait until ALB is actually provisioned #11333

merged 2 commits into from
Jan 23, 2017

Conversation

radeksimko
Copy link
Member

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 in provisioning.

Test plan

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=AWSALB'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/21 22:01:00 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=AWSALB -timeout 120m
=== RUN   TestAccDataSourceAWSALBListener_basic
--- PASS: TestAccDataSourceAWSALBListener_basic (230.98s)
=== RUN   TestAccDataSourceAWSALBListener_https
--- PASS: TestAccDataSourceAWSALBListener_https (267.07s)
=== RUN   TestAccDataSourceAWSALB_basic
--- PASS: TestAccDataSourceAWSALB_basic (233.23s)
=== RUN   TestAccAWSALBListenerRule_basic
--- PASS: TestAccAWSALBListenerRule_basic (214.98s)
=== RUN   TestAccAWSALBListener_basic
--- PASS: TestAccAWSALBListener_basic (221.04s)
=== RUN   TestAccAWSALBListener_https
--- PASS: TestAccAWSALBListener_https (232.37s)
=== RUN   TestAccAWSALBTargetGroupAttachment_basic
--- PASS: TestAccAWSALBTargetGroupAttachment_basic (138.31s)
=== RUN   TestAccAWSALBTargetGroup_basic
--- PASS: TestAccAWSALBTargetGroup_basic (50.28s)
=== RUN   TestAccAWSALBTargetGroup_changeNameForceNew
--- PASS: TestAccAWSALBTargetGroup_changeNameForceNew (81.47s)
=== RUN   TestAccAWSALBTargetGroup_changeProtocolForceNew
--- PASS: TestAccAWSALBTargetGroup_changeProtocolForceNew (90.64s)
=== RUN   TestAccAWSALBTargetGroup_changePortForceNew
--- PASS: TestAccAWSALBTargetGroup_changePortForceNew (80.78s)
=== RUN   TestAccAWSALBTargetGroup_changeVpcForceNew
--- PASS: TestAccAWSALBTargetGroup_changeVpcForceNew (75.31s)
=== RUN   TestAccAWSALBTargetGroup_tags
--- PASS: TestAccAWSALBTargetGroup_tags (79.58s)
=== RUN   TestAccAWSALBTargetGroup_updateHealthCheck
--- PASS: TestAccAWSALBTargetGroup_updateHealthCheck (83.79s)
=== RUN   TestAccAWSALBTargetGroup_updateSticknessEnabled
--- PASS: TestAccAWSALBTargetGroup_updateSticknessEnabled (124.40s)
=== RUN   TestAccAWSALB_basic
--- PASS: TestAccAWSALB_basic (242.37s)
=== RUN   TestAccAWSALB_generatedName
--- PASS: TestAccAWSALB_generatedName (237.67s)
=== RUN   TestAccAWSALB_namePrefix
--- PASS: TestAccAWSALB_namePrefix (227.96s)
=== RUN   TestAccAWSALB_tags
--- PASS: TestAccAWSALB_tags (254.12s)
=== RUN   TestAccAWSALB_updatedSecurityGroups
--- PASS: TestAccAWSALB_updatedSecurityGroups (274.04s)
=== RUN   TestAccAWSALB_noSecurityGroup
--- PASS: TestAccAWSALB_noSecurityGroup (244.23s)
=== RUN   TestAccAWSALB_accesslogs
--- PASS: TestAccAWSALB_accesslogs (303.34s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	3988.009s

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.

Copy link
Contributor

@jen20 jen20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, should stop the support emails we keep getting about this.

@ghost
Copy link

ghost commented Apr 17, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants