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

resource/aws_eip_assocation: Retry association for pending instances #3072

Merged
merged 1 commit into from
Jan 22, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jan 19, 2018

Closes #74
Closes #3041

Created failing acceptance test:

 make testacc TEST=./aws TESTARGS='-run=TestAccAWSEIPAssociation_spotInstance'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEIPAssociation_spotInstance -timeout 120m
=== RUN   TestAccAWSEIPAssociation_spotInstance
--- FAIL: TestAccAWSEIPAssociation_spotInstance (83.92s)
	testing.go:513: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_eip_association.test: 1 error(s) occurred:

		* aws_eip_association.test: [WARN] Error attaching EIP, message: "The pending instance 'i-0fd1d57b0b3e9ea0a' is not in a valid state for this operation.", code: "InvalidInstanceID"
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	83.975s
make: *** [testacc] Error 1

Trying with an initial timeout of 1 minute reproduced similar issue (so bumped it to 2 minutes):

--- FAIL: TestAccAWSEIPAssociation_spotInstance (93.54s)
	testing.go:513: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_eip_association.test: 1 error(s) occurred:

		* aws_eip_association.test: Error associating EIP: InvalidInstanceID: The pending instance 'i-00b32500bb43162da' is not in a valid state for this operation.
			status code: 400, request id: ed0f8b80-d8f6-4b41-8a00-42d2309694ae

Passes testing for me now:

make testacc TEST=./aws TESTARGS='-run=TestAccAWSEIPAssociation'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEIPAssociation -timeout 120m
=== RUN   TestAccAWSEIPAssociation_basic
--- PASS: TestAccAWSEIPAssociation_basic (145.97s)
=== RUN   TestAccAWSEIPAssociation_ec2Classic
--- PASS: TestAccAWSEIPAssociation_ec2Classic (190.02s)
=== RUN   TestAccAWSEIPAssociation_spotInstance
--- PASS: TestAccAWSEIPAssociation_spotInstance (203.60s)
=== RUN   TestAccAWSEIPAssociation_disappears
--- PASS: TestAccAWSEIPAssociation_disappears (112.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	651.856s

@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jan 19, 2018
@bflad bflad added this to the v1.8.0 milestone Jan 19, 2018
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

LGTM 👍 :shipit:

@bflad bflad merged commit be0eb46 into master Jan 22, 2018
@bflad bflad deleted the b-aws_eip_association-pending-instance-retry branch January 22, 2018 12:53
bflad added a commit that referenced this pull request Jan 22, 2018
@bflad
Copy link
Contributor Author

bflad commented Jan 29, 2018

This has been released in terraform-provider-aws version 1.8.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 8, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
2 participants