github suzuki-shunsuke/tfcmt v3.0.0-0

latest releases: v4.9.1, v4.9.0, v4.9.0-2...
pre-release2 years ago

Pull Request | v2.1.0...v3.0.0-0

⚠️ Breaking Changes

#154 #155 Default templates and some templates are changed

tfcmt provides useful templates but they weren't used in the default templates.
From v3, default templates are improved using them.
Futhermore, useful templates are added.

Default templates and existing templates are changed, so this includes breaking changes.

How to migrate

Please check the change and update tfcmt configuration if needed.

What are changed?

  • default plan template
  • default apply template
  • default apply parse error template
  • templates
    • deletion_warning

default plan template

  • Add warning
  • Replace CombinedOutput to changed_result change_outside_terraform

AS IS

{{template "plan_title" .}}
{{if .Link}}[CI link]({{.Link}}){{end}}
{{if .HasDestroy}}{{template "deletion_warning" .}}{{end}}
{{template "result" .}}
{{template "updated_resources" .}}
<details><summary>Details (Click me)</summary>
{{wrapCode .CombinedOutput}}
</details>
{{if .ErrorMessages}}
## :warning: Errors
{{range .ErrorMessages}}
* {{. -}}
{{- end}}{{end}}

TO BE

{{template "plan_title" .}}

{{if .Link}}[CI link]({{.Link}}){{end}}

{{template "deletion_warning" .}}
{{template "result" .}}
{{template "updated_resources" .}}

{{template "changed_result" .}}
{{template "change_outside_terraform" .}}
{{template "warning" .}}
{{template "error_messages" .}}

default apply template

The template guide_apply_failure are inserted.
By default this is empty.
You can insert the guide for apply failure to the template when terraform apply fails.

{{template "apply_title" .}}

{{if .Link}}[CI link]({{.Link}}){{end}}

{{if ne .ExitCode 0}}{{template "guide_apply_failure" .}}{{end}}

{{template "result" .}}

<details><summary>Details (Click me)</summary>
{{wrapCode .CombinedOutput}}
</details>
{{template "error_messages" .}}

default apply parse error template

The template guide_apply_parse_error are inserted.
By default this is empty.
You can insert the guide when it fails to parse the result of terraform apply.

New templates

  • warning
  • error_messages
  • change_outside_terraform
  • guide_apply_failure
  • guide_apply_parse_error

warning

{{if .Warning}}
## :warning: Warnings :warning:
{{wrapCode .Warning}}
{{end}}

error_messages

{{if .ErrorMessages}}
## :warning: Errors
{{range .ErrorMessages}}
* {{. -}}
{{- end}}{{end}}

change_outside_terraform

{{if .ChangeOutsideTerraform}}
<details><summary>:information_source: Objects have changed outside of Terraform</summary>

_This feature was introduced from [Terraform v0.15.4](https://github.com/hashicorp/terraform/releases/tag/v0.15.4)._
{{wrapCode .ChangeOutsideTerraform}}
</details>
{{end}}

guide_apply_failure

By default this is empty.
You can insert the guide for apply failure to the template when terraform apply fails.

guide_apply_parse_error

By default this is empty.
You can insert the guide when it fails to parse the result of terraform apply.

Don't miss a new tfcmt release

NewReleases is sending notifications on new releases.