question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Waiting for VPC Peering Connection to become available

See original GitHub issue

I know that you’re working on various VPC issues, so you may be aware of this problem. I wanted to cover my bases and report it in case you’re not.

I’m using release 2.2.4 of moto.

I have two tests (written in Terraform) that I run against a Terraform module that sets up a peered connection. It doesn’t matter which order I run the tests, the second one fails with the error below. I’m struggling to come up with self-contained tests to demonstrate the problem, but if the error message can’t help point you at the problem, I’ll work on the tests some more.

module.vpc_pcx_requester.aws_route_table_association.public[0]: Creation complete after 0s [id=rtbassoc-60df5245]
 
Error: Error waiting for VPC Peering Connection to become available: 
Error waiting for VPC Peering Connection (pcx-e88f13a3) to become available
unexpected state 'deleted', wanted target 'pending-acceptance, active'. last error: %!s(<nil>)

  with module.generated_route_tables.aws_vpc_peering_connection.this,
  on ../../main.tf line 15, in resource "aws_vpc_peering_connection" "this":
  15: resource "aws_vpc_peering_connection" "this" { !
make: *** [pytest//home/kbalk/plus3it/tardigrade-ci/tests/terraform_pytest] Error 1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bblommerscommented, Aug 26, 2021

Well, one step at the time I suppose. I’ll merge the ‘invalid response’ fix into master for now, and I’ll start looking into the VPC Peering Connection problem either tomorrow or this weekend.

0reactions
bblommerscommented, Aug 27, 2021

There are some 400 response codes related to an InvalidRouteTableID.NotFound, but they’re in a good format and I think they’re just reporting that the route no longer exists?

Yeah, I believe those 400 responses are expected - there isn’t really any other way to verify whether a route has been deleted, other than waiting until there’s an error response.

Happy to hear it works now!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error waiting for VPC Peering Connection (pcx-xxxxxxx) to ...
Expected Behavior​​ Peering connection should have been seen as successfully created and "terraform apply" should have resumed.
Read more >
Create VPC peering connection with VPC in another account
I'm trying to create an Amazon Virtual Private Cloud (Amazon VPC) peering connection between my Amazon VPC and a VPC that's associated with ......
Read more >
vpc-peering-connection-exists - Amazon AWS
Wait until 200 response is received when polling with describe-vpc-peering-connections . It will poll every 15 seconds until a successful state has been ......
Read more >
aws ec2 wait vpc-peering-connection-deleted - Fig.io
Wait until JMESPath query VpcPeeringConnections[].Status.Code returns deleted for all elements when polling with ``describe-vpc-peering-connections``.
Read more >
aws_vpc_peering_connection | Resources | hashicorp/aws
Modifying the VPC Peering Connection options requires peering to be active. An automatic activation can be done using the auto_accept attribute. Alternatively, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found