[Bug]: error reading VPC Endpoint Route Table Association (...): couldn't find resource #30993
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.
Milestone
Terraform Core Version
1.2.9
AWS Provider Version
4.3.5
Affected Resource(s)
Expected Behavior
resource should have been created without error
Actual Behavior
creation failed because resource cannot be found (because of eventual consistency of AWS api) - similarly to #21629
Relevant Error/Panic Output Snippet
2023-04-25T18:20:16.365+0200 [ERROR] provider.terraform-provider-aws_v4.35.0_x5: Response contains error diagnostic: tf_proto_version=5.3 tf_req_id=d7450a73-3452-113c-b277-a83f0d44e474 tf_resource_type=aws_vpc_endpoint_route_table_association tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/internal/diag/diagnostics.go:55 @module=sdk.proto diagnostic_detail= tf_provider_addr=registry.terraform.io/hashicorp/aws diagnostic_severity=ERROR diagnostic_summary="error reading VPC Endpoint Route Table Association (vpce-0ec749d5e82b5d7f4/rtb-0f5b710b97279ba71): couldn't find resource" timestamp=2023-04-25T18:20:16.363+0200
Terraform Configuration Files
resource "aws_vpc_endpoint_route_table_association" "public_s3" {
vpc_endpoint_id = aws_vpc_endpoint.s3.id
route_table_id = aws_route_table.main.id
}
Steps to Reproduce
Create the resource in a loop run repeatedly ideally tens or hundreds of times until you hit this AWS race/eventual consistency bug
Debug Output
Panic Output
No response
Important Factoids
As you can see in the trace logs, the repeated describe already returned the existing association but then the next request fails
References
Similar to #21629
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: