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

Correctly refresh VGW attachment state #8576

Merged
merged 1 commit into from
May 13, 2019
Merged

Conversation

ewbankkit
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #8575.

Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpnGatewayAttachment_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSVpnGatewayAttachment_ -timeout 120m
=== RUN   TestAccAWSVpnGatewayAttachment_basic
=== PAUSE TestAccAWSVpnGatewayAttachment_basic
=== RUN   TestAccAWSVpnGatewayAttachment_deleted
=== PAUSE TestAccAWSVpnGatewayAttachment_deleted
=== CONT  TestAccAWSVpnGatewayAttachment_basic
=== CONT  TestAccAWSVpnGatewayAttachment_deleted
--- PASS: TestAccAWSVpnGatewayAttachment_basic (65.76s)
--- PASS: TestAccAWSVpnGatewayAttachment_deleted (85.62s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	85.673s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpnGateway_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccAWSVpnGateway_ -timeout 120m
=== RUN   TestAccAWSVpnGateway_importBasic
=== PAUSE TestAccAWSVpnGateway_importBasic
=== RUN   TestAccAWSVpnGateway_basic
=== PAUSE TestAccAWSVpnGateway_basic
=== RUN   TestAccAWSVpnGateway_withAvailabilityZoneSetToState
=== PAUSE TestAccAWSVpnGateway_withAvailabilityZoneSetToState
=== RUN   TestAccAWSVpnGateway_withAmazonSideAsnSetToState
=== PAUSE TestAccAWSVpnGateway_withAmazonSideAsnSetToState
=== RUN   TestAccAWSVpnGateway_disappears
=== PAUSE TestAccAWSVpnGateway_disappears
=== RUN   TestAccAWSVpnGateway_reattach
=== PAUSE TestAccAWSVpnGateway_reattach
=== RUN   TestAccAWSVpnGateway_delete
=== PAUSE TestAccAWSVpnGateway_delete
=== RUN   TestAccAWSVpnGateway_tags
=== PAUSE TestAccAWSVpnGateway_tags
=== CONT  TestAccAWSVpnGateway_importBasic
=== CONT  TestAccAWSVpnGateway_reattach
--- PASS: TestAccAWSVpnGateway_importBasic (90.23s)
=== CONT  TestAccAWSVpnGateway_delete
--- PASS: TestAccAWSVpnGateway_delete (105.04s)
=== CONT  TestAccAWSVpnGateway_withAmazonSideAsnSetToState
--- PASS: TestAccAWSVpnGateway_reattach (212.81s)
=== CONT  TestAccAWSVpnGateway_disappears
--- PASS: TestAccAWSVpnGateway_withAmazonSideAsnSetToState (50.69s)
=== CONT  TestAccAWSVpnGateway_withAvailabilityZoneSetToState
--- PASS: TestAccAWSVpnGateway_disappears (50.12s)
=== CONT  TestAccAWSVpnGateway_basic
--- PASS: TestAccAWSVpnGateway_withAvailabilityZoneSetToState (50.81s)
=== CONT  TestAccAWSVpnGateway_tags
--- PASS: TestAccAWSVpnGateway_basic (92.95s)
--- PASS: TestAccAWSVpnGateway_tags (76.91s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	373.757s

@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. labels May 9, 2019
@@ -291,50 +294,12 @@ func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error
return nil
}

// vpnGatewayAttachStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove as duplicate of vpnGatewayAttachmentStateRefresh().

@ewbankkit
Copy link
Contributor Author

Both aws_vpn_gateway and aws_vpn_gateway_attachment require some further "modernization" but not for this PR.

Copy link
Member

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @ewbankkit 🚀

--- PASS: TestAccDataSourceAwsVpnGateway_unattached (15.98s)
--- PASS: TestAccAWSVpnGatewayAttachment_basic (52.86s)
--- PASS: TestAccAWSVpnGatewayAttachment_deleted (65.54s)
--- PASS: TestAccDataSourceAwsVpnGateway_attached (69.62s)
--- PASS: TestAccAWSVpnGateway_withAmazonSideAsnSetToState (70.22s)
--- PASS: TestAccAWSVpnGateway_withAvailabilityZoneSetToState (70.62s)
--- PASS: TestAccAWSVpnGateway_importBasic (72.58s)
--- PASS: TestAccAWSVpnGateway_disappears (74.03s)
--- PASS: TestAccAWSVpnGateway_basic (86.41s)
--- PASS: TestAccAWSVpnGateway_delete (87.27s)
--- PASS: TestAccAWSVpnGateway_tags (97.30s)
--- PASS: TestAccAWSVpnGateway_reattach (151.17s)
--- PASS: TestAccAwsDxGatewayAssociation_basic (1147.23s)
--- PASS: TestAccAwsDxGatewayAssociation_multiVgws (1148.02s)
--- PASS: TestAccAwsDxGatewayAssociation_allowedPrefixes (1760.45s)

@bflad bflad merged commit bc9c1d5 into hashicorp:master May 13, 2019
bflad added a commit that referenced this pull request May 13, 2019
@ewbankkit ewbankkit deleted the issue-8575 branch May 13, 2019 18:42
@bflad
Copy link
Member

bflad commented May 17, 2019

This has been released in version 2.11.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 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. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_vpn_gateway and aws_vpn_gateway_attachment incorrectly refreshing attachment state
2 participants