-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 #13951
Comments
This request makes sense in theory but in practice the Looking at the code, it doesn't appear that this data source was designed to handle more than 1 vpc. |
May be you should look at aws_vpcS then 😀 |
Gah! I totally missed that. I'm working on a PR to implement this. |
Fixed with #22253 |
This functionality has been released in v4.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
This issue was originally opened by @swetli as hashicorp/terraform#25141. It was migrated here as a result of the provider split. The original body of the issue is below.
Current Terraform Version
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" {}
Proposal
data source "aws_vpcs" should return an empty list, like the aws cli:
References
The text was updated successfully, but these errors were encountered: