Terraform-provider-aws: Error on data source does not show additional info with line and resource where it happened

Created on 23 Sep 2020  路  2Comments  路  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.12.29
Terraform v0.13.3

provider aws v3.7.0

Affected Resource(s)

data sources

Expected Behavior

Error: no matching VPC found                                                                                                                                                                                       

  on data.tf line 51, in data "aws_vpc" "test-pen":                                                                                                                                                                
  51: data "aws_vpc" "test-pen" {

Actual Behavior

Error: no matching VPC found

Steps to Reproduce

Create a data source that cant possibly return a value and you get an error that the resource was not found but it does not tell you what resource it is and on what line

With terraform 12.28 and AWS provider v2.63.0 all worked as expected but after update to latest (and tried terraform 0.13 too) it does not show helping information

bug servicec2 upstream-terraform

Most helpful comment

This occurred after upgrading to Terraform Plugin SDK version 2 -- upstream bug report: https://github.com/hashicorp/terraform-plugin-sdk/issues/561

All 2 comments

This occurred after upgrading to Terraform Plugin SDK version 2 -- upstream bug report: https://github.com/hashicorp/terraform-plugin-sdk/issues/561

Due to the same issue, this makes some more generic error messages very hard to debug (searching for an AMI)

Error: Your query returned no results. Please change your search criteria and try again
Was this page helpful?
0 / 5 - 0 ratings