Skip to content

"tfcmt failed" error="html/template:default:12:11: no such template \"error_message\" #1492

Discussion options

You must be logged in to vote

Thank you for your report!

  1. I could reproduce the issue.

tfcmt.yaml

terraform:
  templates:
    error_message: |
      {{if .ErrorMessages}}
      ## :warning: Errors
      {{range .ErrorMessages}}
      * {{. -}}
      {{- end}}{{end}}
  plan:
    template: |
      {{template "error_message" .}}

main.tf

resource "null_resource" "foo" {}
terraform init
$ tfcmt plan -- terraform plan

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # null_resource.foo will be created
  + resource "null_resource" "foo" {
      + id = (known after apply)
    }

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by suzuki-shunsuke
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1490 on November 24, 2024 23:01.