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

[Bug]: Error: no matching EC2 VPC found for data "aws_vpc" even if it exists #27203

Closed
dipalivivekverma opened this issue Oct 11, 2022 · 3 comments
Labels
bug Addresses a defect in current functionality. service/vpc Issues and PRs that pertain to the vpc service.

Comments

@dipalivivekverma
Copy link

Terraform Core Version

0.12.31

AWS Provider Version

4.26

Affected Resource(s)

Started upgrading terraform from 0.11.14 to 0.12.31
All stack apply went fine but fails on eu-central-1 with
Error: no matching EC2 VPC found for data "aws_vpc" "selected" { tags = {
Name = var.vpc
}
} I verified the vpc exists for the region and with old terraform 0.11.14 the apply works

Error: error reading SNS Topic (arn:aws:sns:eu-central-1:941285077303:fms-eu-swarm-blue-worker-windows-scaling): InvalidParameter: Invalid parameter: TopicArn
status code: 400, request id: b4888a16-e5d9-5fe2-ae59-d1a97fee2134

Expected Behavior

vpc should be found

Actual Behavior

Error: no matching EC2 VPC found

Relevant Error/Panic Output Snippet

Error: error reading SNS Topic (arn:aws:sns:eu-central-1:941285077303:fms-eu-swarm-green-manager-scaling): InvalidParameter: Invalid parameter: TopicArn
        status code: 400, request id: cb31cc63-89c4-5886-b0fd-97dc13fc4ebe



Error: no matching EC2 VPC found

  on ..\..\..\modules\swarm_blue_green_common\data.tf line 31, in data "aws_vpc" "selected":
  31: data "aws_vpc" "selected" {

Terraform Configuration Files

fms-eu.zip

Steps to Reproduce

terraform init
terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

@dipalivivekverma dipalivivekverma added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Oct 11, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/vpc Issues and PRs that pertain to the vpc service. label Oct 11, 2022
@dipalivivekverma
Copy link
Author

Adding this setting in version.tf made it better

provider "aws" {
version = "~> 4.26"
region = var.region
}

@github-actions github-actions bot removed the needs-triage Waiting for first response or review from a maintainer. label Oct 12, 2022
@github-actions
Copy link

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 have found a problem that seems similar to this, 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 Nov 12, 2022
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/vpc Issues and PRs that pertain to the vpc service.
Projects
None yet
Development

No branches or pull requests

1 participant