{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/1758","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/1758/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/1758/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/1758/events","html_url":"https://github.com/hashicorp/terraform/issues/1758","id":72235176,"number":1758,"title":"Errors should report file/module names and/or line numbers where possible","user":{"login":"ketzacoatl","id":10122937,"avatar_url":"https://avatars.githubusercontent.com/u/10122937?v=3","gravatar_id":"","url":"https://api.github.com/users/ketzacoatl","html_url":"https://github.com/ketzacoatl","followers_url":"https://api.github.com/users/ketzacoatl/followers","following_url":"https://api.github.com/users/ketzacoatl/following{/other_user}","gists_url":"https://api.github.com/users/ketzacoatl/gists{/gist_id}","starred_url":"https://api.github.com/users/ketzacoatl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ketzacoatl/subscriptions","organizations_url":"https://api.github.com/users/ketzacoatl/orgs","repos_url":"https://api.github.com/users/ketzacoatl/repos","events_url":"https://api.github.com/users/ketzacoatl/events{/privacy}","received_events_url":"https://api.github.com/users/ketzacoatl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-30T18:01:47Z","updated_at":"2015-04-30T18:01:47Z","closed_at":null,"body":"I'm almost embarrased to say, but some of my TF code has me stumped atm, and I'm realizing the majority of the problem is that I have _no idea_ what TF is actually referring to in my code.\r\n\r\n```\r\nᐅ tfp -module-depth=1 \r\nThere are warnings and/or errors related to your configuration. Please\r\nfix these before continuing.\r\n\r\nErrors:\r\n\r\n  * provider.aws: \"access_key\": required field is not set\r\n  * provider.aws: \"secret_key\": required field is not set\r\n  * provider.aws: \"region\": required field is not set\r\n```\r\n\r\nGrep is your friend right? This should be easy to debug you say.. \r\n\r\n```\r\nᐅ         grep -R secret ./       \r\n./terraform.tfvars:secret_key = \"FOOBAR\"\r\n./terraform.tfvars:consul_secret_key = \"FOOBAR==\"\r\n./asg.tf:    secret_key = \"${var.secret_key}\"\r\n./asg.tf:    consul_secret_key = \"${var.consul_secret_key}\"\r\n./asg.tf:    secret_key = \"${var.secret_key}\"\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/terraform.tfvars:# Update these with AWS key id/secret\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/terraform.tfvars:#secret_key = \"FOOBAR\"\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/terraform.tfvars:#consul_secret_key = \"FOOBAR==\"\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/providers.tf:    secret_key = \"${var.secret_key}\"\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/variables.tf:variable \"secret_key\" {\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/variables.tf:    description = \"AWS key secret\"\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/variables.tf:variable \"consul_secret_key\" {\r\n./.terraform/modules/7206d8f30df8a8f26276fb9d0f6ac24e/main.tf:#    secret_key = \"${var.secret_key}\"\r\n./.terraform/modules/ea621125d274b1a478ff64ff0a781085/providers.tf:    secret_key = \"${var.secret_key}\"\r\n./.terraform/modules/ea621125d274b1a478ff64ff0a781085/variables.tf:variable \"secret_key\" {\r\n./.terraform/modules/ea621125d274b1a478ff64ff0a781085/variables.tf:    description = \"AWS key secret\"\r\n./providers.tf:    secret_key = \"${var.secret_key}\"\r\n./variables.tf:variable \"consul_secret_key\" {\r\n./variables.tf:variable \"secret_key\" {}\r\n```\r\n\r\nWhile I have the names of the variables to grep for, TF isn't telling me which module it is in, the file it is processing, or line number, so it's much more difficult to debug."}}