Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

does it work for cross region vpc in the same account? #52

Open
mohnishbasha opened this issue Jun 22, 2023 · 0 comments
Open

does it work for cross region vpc in the same account? #52

mohnishbasha opened this issue Jun 22, 2023 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@mohnishbasha
Copy link

mohnishbasha commented Jun 22, 2023

Describe the Bug

Running into the following error I am using the module to establish a vpc peering connection between 2 vpcs in different regions but in the same account.

module.requestor_subnets_additional.aws_network_acl_rule.private4_ingress[0]: Refreshing state... [id=nacl-2709026851]

Planning failed. Terraform encountered an error while generating this plan.


│ Error: no matching EC2 VPC found

│ with module.vpc_peering.data.aws_vpc.acceptor[0],
│ on ../../main.tf line 33, in data "aws_vpc" "acceptor":
│ 33: data "aws_vpc" "acceptor" {

Expected Behavior

The module should be able to establish a vpc peering connection for vpcs in different regions.

Steps to Reproduce

- terraform init.
- terraform apply -var-file=fixtures.us-east-2.tfvars -target=module.requestor_vpc
- terraform apply -var-file=fixtures.us-east-2.tfvars -target=module.requestor_subnets
- terraform apply -var-file=fixtures.us-east-2.tfvars -target=module.requestor_subnets_additional
- terraform apply -var-file=fixtures.us-east-2.tfvars -target=module.acceptor_vpc
- terraform apply -var-file=fixtures.us-east-2.tfvars -target=module.acceptor_subnets
- terraform apply -var-file=fixtures.us-east-2.tfvars -target=module.vpc_peering

Error:

╷
│ Error: no matching EC2 VPC found
│ 
│   with module.vpc_peering.data.aws_vpc.acceptor[0],
│   on ../../main.tf line 33, in data "aws_vpc" "acceptor":
│   33: data "aws_vpc" "acceptor" {
│ 
╵

Screenshots

No response

Environment

  • OS: macOSX
  • version: 11.4
  • Terraform version: 1.5.0

Additional Context

No response

@mohnishbasha mohnishbasha added the bug 🐛 An issue with the system label Jun 22, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant