Skip to content

Template error needs to be more verbose #2332

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

Closed
ericpaulsen opened this issue Jun 14, 2022 · 2 comments · Fixed by #2331
Closed

Template error needs to be more verbose #2332

ericpaulsen opened this issue Jun 14, 2022 · 2 comments · Fixed by #2331
Assignees
Labels
cli Area: CLI
Milestone

Comments

@ericpaulsen
Copy link
Member

In the screenshot below, there is an issue with the right operand of one of my resource arguments. I don't have any visibility into which resource is throwing this error, and how it can be resolved.

Screen Shot 2022-06-14 at 5 58 24 PM

@ericpaulsen ericpaulsen added the cli Area: CLI label Jun 14, 2022
@ericpaulsen ericpaulsen changed the title Template error does not show which resource/argument is faulty Template error needs to be more verbose Jun 14, 2022
@ericpaulsen
Copy link
Member Author

Default terraform error provides the level of detail required to address the issue:

Error: Invalid operand
 
  on 2nd.tf line 38, in resource "google_cloud_run_service" "renderer":
  38:         image = "gcr.io/" + var.project_id + "/renderer:latest"
 
Unsuitable value for left operand: a number is required.

@ketang
Copy link
Contributor

ketang commented Jun 14, 2022

I only skimmed the change, but it looks like you did what I was going to suggest, which is to never let Terraform exit unhappily without printing its last output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants