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

Data source aws_vpcs should not fail if no VPCs are found #25141

Closed
swetli opened this issue Jun 5, 2020 · 2 comments
Closed

Data source aws_vpcs should not fail if no VPCs are found #25141

swetli opened this issue Jun 5, 2020 · 2 comments

Comments

@swetli
Copy link

swetli commented Jun 5, 2020

Current Terraform Version

Terraform v0.12.25
+ provider.aws v2.64.0

Use-cases

I have a module which utilizes for_each to enable VPC flow logs on all VPCs found in a region, however if I run the module on account/region with empty VPC list the data source returns an error:
data "aws_vpcs" "all" {}

  on modules/vpc_logs/main.tf line 2, in data "aws_vpcs" "all":
   2: data "aws_vpcs" "all" {

Error: no matching VPC found

Proposal

data source "aws_vpcs" should return an empty list, like the aws cli:

aws--region=eu-west-1 ec2 describe-vpcs
{
    "Vpcs": []
}

References

@ghost
Copy link

ghost commented Jun 25, 2020

This issue has been automatically migrated to hashicorp/terraform-provider-aws#13951 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#13951.

@ghost
Copy link

ghost commented Jul 26, 2020

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.

@ghost ghost locked and limited conversation to collaborators Jul 26, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants