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

aws_egress_only_internet_gateway: Adjust eventualy consistent logic #6190

Merged

Conversation

gseyetik
Copy link
Contributor

Fixes eventually consistent creates not being captured by the current logic.

Changes proposed in this pull request:

  • Remove state change function that is overly verbose for our situation.
  • Move eventually consistent logic in to read function.
    • The current logic does an immediate read after the first success which could still lead to the new object being removed from the state.
  • Remove the check for a non existent error.

Other:
I kept the weird logic of checking the array for the id being found but I'm not sure that is really needed either.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEgressOnlyInternetGateway_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSEgressOnlyInternetGateway_basic -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSEgressOnlyInternetGateway_basic
=== PAUSE TestAccAWSEgressOnlyInternetGateway_basic
=== CONT  TestAccAWSEgressOnlyInternetGateway_basic
--- PASS: TestAccAWSEgressOnlyInternetGateway_basic (32.46s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	32.481s

This is the first time I've tried to run the tests. If this wasn't done correctly let me know.

@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Oct 17, 2018
@bflad bflad added the service/ec2 Issues and PRs that pertain to the ec2 service. label Oct 26, 2018
Copy link
Contributor

@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.

Thanks for cleaning this up, @gseyetik! Two little things then I think this should be good to go.

aws/resource_aws_egress_only_internet_gateway.go Outdated Show resolved Hide resolved
aws/resource_aws_egress_only_internet_gateway.go Outdated Show resolved Hide resolved
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 26, 2018
@gseyetik
Copy link
Contributor Author

Thank you for the feedback @bflad. Changes made. Test below.

[gseyetik@localhost terraform-provider-aws]$ make testacc TESTARGS='-run=TestAccAWSEgressOnlyInternetGateway_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSEgressOnlyInternetGateway_basic -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSEgressOnlyInternetGateway_basic
=== PAUSE TestAccAWSEgressOnlyInternetGateway_basic
=== CONT  TestAccAWSEgressOnlyInternetGateway_basic
--- PASS: TestAccAWSEgressOnlyInternetGateway_basic (35.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	35.061s

@bflad bflad added bug Addresses a defect in current functionality. and removed waiting-response Maintainers are waiting on response from community or contributor. labels Oct 30, 2018
@bflad bflad added this to the v1.42.0 milestone Oct 30, 2018
Copy link
Contributor

@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 @gseyetik! 🚀

--- PASS: TestAccAWSEgressOnlyInternetGateway_basic (6.10s)

@bflad bflad merged commit b32d14e into hashicorp:master Oct 30, 2018
bflad added a commit that referenced this pull request Oct 30, 2018
@bflad
Copy link
Contributor

bflad commented Nov 1, 2018

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

@ghost
Copy link

ghost commented Apr 2, 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 2, 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.

None yet

2 participants