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

Fix inconsistent read after create for vpc_route_table #30999

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

alenkacz
Copy link
Contributor

@alenkacz alenkacz commented Apr 26, 2023

Description

Similar to
This fixes read after newly created vpc_route_table that can fail because of AWS API eventual consistency https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html

2023-04-19T13:38:24.273Z	ERROR	.rpk.managed-byoc	zapio/writer.go:145
        	            	failed applying network resource: failed creating network: failed running terraform apply: exit status 1
        	            	Error: error reading Route Table (rtb-0dedaa5ab2fbf3cc2): couldn't find resource
        	            	  with module.network[0].aws_route_table.private[1],
        	            	  on ../../modules/terraform-aws-redpanda-network/routing.tf line 11, in resource "aws_route_table" "private":
        	            	  11: resource "aws_route_table" "private" {

Similar to #30994 - I don't have debug logs for this one but it's obviously the same problem.

Relations

Relates #30993
Closes #31895

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccXXX PKG=ec2

...

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/vpc Issues and PRs that pertain to the vpc service. size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. and removed service/vpc Issues and PRs that pertain to the vpc service. labels Apr 26, 2023
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. eventual-consistency Pertains to eventual consistency issues. service/vpc Issues and PRs that pertain to the vpc service. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 26, 2023
@alenkacz
Copy link
Contributor Author

@ewbankkit do you think we can merge this one as well? 🙏

@alenkacz
Copy link
Contributor Author

alenkacz commented May 9, 2023

@ewbankkit is there sth I can do to help merge this one?

@alenkacz
Copy link
Contributor Author

@ewbankkit ping :)

@c4milo
Copy link
Contributor

c4milo commented May 16, 2023

@ewbankkit, please let us know how else we can help get this fix merged since it is affecting our production system.

@sbocinec
Copy link
Contributor

This PR is left forgotten for quite some time here despite we are affected by the issue consistently. I have created an issue #31895 - maybe some of the maintainers can have a look? @ewbankkit thank you in advance!

@alenkacz alenkacz force-pushed the av/fix-read-retry-routetable branch from 6e6f908 to 47a252c Compare June 12, 2023 15:52
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccVPCRouteTable_basic\|TestAccVPCRouteTable_disappears' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccVPCRouteTable_basic\|TestAccVPCRouteTable_disappears -timeout 180m
=== RUN   TestAccVPCRouteTable_basic
=== PAUSE TestAccVPCRouteTable_basic
=== RUN   TestAccVPCRouteTable_disappears
=== PAUSE TestAccVPCRouteTable_disappears
=== CONT  TestAccVPCRouteTable_basic
=== CONT  TestAccVPCRouteTable_disappears
--- PASS: TestAccVPCRouteTable_disappears (25.49s)
--- PASS: TestAccVPCRouteTable_basic (29.19s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	35.125s

@ewbankkit
Copy link
Contributor

@alenkacz Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 1f8c772 into hashicorp:main Jun 16, 2023
@github-actions github-actions bot added this to the v5.5.0 milestone Jun 16, 2023
@github-actions
Copy link

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2023
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. eventual-consistency Pertains to eventual consistency issues. service/vpc Issues and PRs that pertain to the vpc service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_route_table - error reading Route Table (...): couldn't find resource
4 participants