Skip to content

Releases: suzuki-shunsuke/tfcmt

v4.6.0

21 Sep 10:04
v4.6.0
c82e81a
Compare
Choose a tag to compare

Pull Requests | Issues | v4.5.1...v4.6.0

Features

#930 #932 List imported or moved resources even if they are changed or replaced

tfcmt v4.5.0 now lists imported or moved resources, but doesn't list them if they are changed or replaced.
This release enables to list imported or moved resources even if they are changed.

v4.5.1

10 Sep 06:13
v4.5.1
2dd4a59
Compare
Choose a tag to compare

Pull Requests | Issues | v4.5.0...v4.5.1

Bug Fixes

  • #117 #896 (#904 #909 #910) Fix parse errors when only Outputs will be changed
  • #903 #911 Support parsing errors and warnings without terraform plan's -no-color option
  • #907 --output: List imported and moved resources
  • #906 Fix the title by error messages

Fix parse errors when only Outputs will be changed

#117 #896 (#904 #909 #910)

tfcmt ever couldn't parse the output of terraform plan if only Terraform's Outputs will be changed.

e.g.

$ tfcmt plan -- terraform plan

Changes to Outputs:
  + foo = "foo"

You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

image

As of tfcmt v4.5.1, tfcmt can parse the output properly.

image

Support parsing errors and warnings without terraform plan's -no-color option

#903 #911

tfcmt ever couldn't parse errors and warnings without terraform plan's -no-color option because they start with |.

tfcmt plan -- terraform plan

e.g.

╷
│ Warning: "default_branch": [DEPRECATED] Use the github_branch_default resource instead
│ 
│   with github_repository.tfcmt,
│   on main.tf line 10, in resource "github_repository" "tfcmt":10: resource "github_repository" "tfcmt" {
│ 
│ (and one more similar warning elsewhere)
╵

As of tfcmt v4.5.1, tfcmt supports parsing warnings and errors even if the -no-color option isn't set.

--output: List imported and moved resources

#907

Follow up #881 and #884

https://github.com/suzuki-shunsuke/tfcmt/releases/tag/v4.5.0

https://suzuki-shunsuke.github.io/tfcmt/output-file

Fix the title by error messages

#906

tfcmt changes the title by the result of terraform commands

Success

## Plan Result

Failure

## :x: Plan Failed

tfcmt evers checked only the exit code of terraform commands,
but as of tfcmt v4.5.1, tfcmt checks also if terraform commands outputs errors.

This is useful when you outputs terraform commands to a text file and runs tfcmt.

e.g.

terraform plan > plan.txt 2>&1
tfcmt plan -- cat plan.txt

Contributors

Thank you for your contribution!

#896 @taro-kayo

v4.5.1-2

10 Sep 05:01
v4.5.1-2
10e22fb
Compare
Choose a tag to compare
v4.5.1-2 Pre-release
Pre-release

Pull Requests | Issues | v4.5.1-1...v4.5.1-2

Changelog

  • 10e22fb fix: support paring warnings without -no-color (#911)
  • 531d1a6 fix: pass HasError to template (#910)
  • f55f012 fix: make the result errors even if outputs will be changed (#909)
  • bdc9022 refactor: separate the regular expression for pass and outputs changes (#908)
  • fe1a45e fix(localfile): list moved and imported resources (#907)
  • 116c118 fix: change the command status by not only exit code but also error messages (#906)
  • 51ee496 refactor: rename HasPlanError to HasError (#905)
  • 4d9911b fix: check Fail before Pass (#904)
  • ff8507a feat: support parsing error without -no-color (#903)
  • ab384d0 refactor: remove ExitCode from ParseResult (#902)
  • 52c8b07 refactor: stop returning the exit code (#901)
  • 9ddad95 refactor: remove an unused default parser (#899)
  • 40fb921 chore(aqua): update aqua-checksums.json
  • c5efb07 chore(deps): update dependency aquaproj/aqua-registry to v4.47.0

v4.5.1-1

09 Sep 11:34
v4.5.1-1
c4a74db
Compare
Choose a tag to compare
v4.5.1-1 Pre-release
Pre-release

Pull Requests | Issues | v4.5.0...v4.5.1-1

Changelog

  • c4a74db fix: parse error when only outputs is changed (#896)
  • 7cb1a89 chore(aqua): update aqua-checksums.json
  • 3d116b9 chore(deps): update dependency aquaproj/aqua-registry to v4.46.0
  • 9555fb6 chore(aqua): update aqua-checksums.json
  • f0cdc6c chore(deps): update dependency aquaproj/aqua-registry to v4.45.0
  • 6502f19 chore(aqua): update aqua-checksums.json
  • 95f2326 chore(deps): update dependency aquaproj/aqua-registry to v4.44.3
  • a68d24e chore(aqua): update aqua-checksums.json
  • f60cbc9 chore(deps): update dependency aquaproj/aqua-registry to v4.44.2
  • 98e34fe chore(deps): update dependency golang/go to v1.21.1
  • 635d1cf chore(aqua): update aqua-checksums.json
  • 828f626 chore(deps): update dependency reviewdog/reviewdog to v0.15.0
  • 033c6a0 chore(go): go mod tidy
  • adab827 fix(deps): update module golang.org/x/oauth2 to v0.12.0
  • 733de63 chore(aqua): update aqua-checksums.json
  • 272bd32 chore(deps): update dependency aquaproj/aqua-registry to v4.44.1
  • c8397b7 chore(aqua): update aqua-checksums.json
  • 911988b chore(deps): update dependency aquaproj/aqua-registry to v4.44.0
  • b21151a chore(aqua): update aqua-checksums.json
  • 7738078 chore(deps): update dependency aquaproj/aqua-registry to v4.43.1

v4.5.0

02 Sep 02:13
v4.5.0
3834282
Compare
Choose a tag to compare

Pull Requests | Issues | v4.4.3...v4.5.0

Features

#880 #881 Add moved resources to the list of changed resources
#882 #884 Add imported resources to the list of changed resources

image

Add the template variables MovedResources and ImportedResources, which is a list of imported resources.

e.g.

MovedResources:
  - Before: null_resource.foo
    After: null_resource.bar
ImportedResources:
  - github_repository.tfcmt

Add the list of moved resources and imported resources to the built in template updated_resources.

If you use the default template, you don't have to do anything because the moved resources and imported resources are added to the default template.

Others

#855 #862 Upgrade Go v1.20.6 to v1.21.0

v4.5.0-1

02 Sep 02:00
v4.5.0-1
b474d50
Compare
Choose a tag to compare
v4.5.0-1 Pre-release
Pre-release

Pull Requests | Issues | v4.4.3...v4.5.0-1

Changelog

  • b474d50 feat: add imported resources to the list of changed resources (#884)
  • fff9e9a chore(cmdx): add short command i (#883)
  • 0f01617 feat: add moved resources to changed resources (#881)
  • 154fa60 chore(aqua): update aqua-checksums.json
  • 6c3130c chore(deps): update dependency aquaproj/aqua-registry to v4.43.0
  • 6c63b54 chore(aqua): update aqua-checksums.json
  • 7d93b8b chore(deps): update dependency aquaproj/aqua-registry to v4.42.0
  • 28ed03e chore(aqua): update aqua-checksums.json
  • d015f75 chore(deps): update dependency aquaproj/aqua-registry to v4.41.1
  • a42a709 chore(aqua): update aqua-checksums.json
  • 788f80b chore(deps): update dependency aquaproj/aqua-registry to v4.41.0
  • 33f88d7 chore(aqua): update aqua-checksums.json
  • 7db89a5 chore(deps): update dependency aquaproj/aqua-registry to v4.40.0
  • 70b66e3 chore(aqua): update aqua-checksums.json
  • 360c8f0 chore(deps): update dependency aquaproj/aqua-registry to v4.39.0
  • 96fb89a chore(aqua): update aqua-checksums.json
  • 32e43ff chore(deps): update dependency aquaproj/aqua-registry to v4.38.0
  • 469e6db chore(aqua): update aqua-checksums.json
  • e95065a chore(deps): update dependency aquaproj/aqua-registry to v4.37.0
  • c45a91b chore(deps): update suzuki-shunsuke/go-release-workflow action to v0.4.3
  • 7296c0e chore(aqua): update aqua-checksums.json
  • e847878 chore(deps): update dependency aquaproj/aqua-registry to v4.36.0
  • ce34676 chore(aqua): update aqua-checksums.json
  • fb26b7d chore(deps): update dependency goreleaser/goreleaser to v1.20.0
  • fe01b36 chore(deps): update dependency aquaproj/aqua-renovate-config to v1.8.0
  • 4852977 chore(deps): update dependency aquaproj/aqua-registry to v4.35.0 (#864)
  • 6ce9fc1 chore(deps): update dependency aquaproj/aqua-renovate-config:file to v1.8.0
  • 7a2c875 chore(aqua): update aqua-checksums.json
  • 0a76ffb chore(deps): update dependency aquaproj/aqua-registry to v4.34.0
  • 1e9ce13 chore(deps): update dependency golang/go to v1.21.0
  • 1d5a52b chore(deps): update actions/setup-go action to v4.1.0
  • 06229cf chore(aqua): update aqua-checksums.json
  • d047e4f chore(deps): update dependency aquaproj/aqua-registry to v4.33.0
  • afb174d chore(go): go mod tidy
  • 2793480 fix(deps): update module golang.org/x/oauth2 to v0.11.0
  • 4fa374b chore(aqua): update aqua-checksums.json
  • dcc7122 chore(deps): update dependency aquaproj/aqua-registry to v4.32.2
  • 9ab16e6 chore(aqua): update aqua-checksums.json
  • 3811283 chore(deps): update dependency aquaproj/aqua-registry to v4.32.1
  • 7967eca chore(deps): update dependency golang/go to v1.20.7
  • 3d2a88e chore(aqua): update aqua-checksums.json
  • 13604ec chore(deps): update dependency aquaproj/aqua-registry to v4.32.0

v4.4.3

27 Jul 14:14
v4.4.3
4a492ac
Compare
Choose a tag to compare

Pull Requests | Issues | v4.4.2...v4.4.3

Others

#850 refactor: Replace suzuki-shunsuke/go-timeout to exec.CommandContext, Cmd.Cancel, and Cmd.WaitDelay
#833 #842 Update Go 1.20.1 to 1.20.6

v4.4.2

24 Jun 06:45
v4.4.2
49d3663
Compare
Choose a tag to compare

Pull Requests | Issues | v4.4.1...v4.4.2

Fixes

#823 #824 Fix summaries of tainted resources
#829 #831 Fix summaries of resources replaced by terraform's -replace options

tfcmt parses the output of terraform and outputs the list of replaced resources as the following.

image
* Replace
  * null_resource.foo

But tfcmt didn't parse the output of terraform well and the above list wasn't outputted properly when some resources were replaced by terraform's taint command or -replace option.

This release fixes the bug.

v4.4.2-1

20 Jun 21:38
v4.4.2-1
bf411a0
Compare
Choose a tag to compare
v4.4.2-1 Pre-release
Pre-release

Pull Requests | Issues | v4.4.1...v4.4.2-1

Changelog

  • bf411a0 fix: fix summay of tainted resources (#824)
  • 737048a chore: remove aqua-policy.yaml (#825)
  • f9b1423 chore(deps): update dependency aquaproj/aqua-registry to v4.21.0 (#822)
  • abee1e9 fix(deps): update module github.com/google/go-github/v53 to v53.2.0 (#821)
  • 186f8c2 chore(deps): update dependency reviewdog/reviewdog to v0.14.2 (#820)
  • 58eefd7 fix(deps): update module github.com/urfave/cli/v2 to v2.25.7 (#819)
  • 038ce7d chore(deps): update dependency aquaproj/aqua-registry to v4.20.0 (#818)
  • 43f22c2 chore(deps): update dependency aquaproj/aqua to v2.9.0 (#817)
  • c8b56eb chore(deps): update dependency aquaproj/aqua-registry to v4.19.0 (#816)
  • 02f13ec chore(deps): update dependency rhysd/actionlint to v1.6.25 (#815)
  • 199636f fix(deps): update module golang.org/x/oauth2 to v0.9.0 (#814)
  • 5107a0e fix(deps): update module github.com/google/go-github/v52 to v53 (#809)
  • c828923 fix(deps): update module github.com/urfave/cli/v2 to v2.25.6 (#812)
  • e0e86ed chore(deps): update dependency aquaproj/aqua-registry to v4.18.0 (#813)
  • 103a5cc chore(deps): update dependency aquaproj/aqua-registry to v4.15.0 (#810)
  • 09c7120 fix(deps): update module github.com/sirupsen/logrus to v1.9.3 (#808)
  • cc2764c chore(deps): update dependency aquaproj/aqua-registry to v4.14.1 (#807)
  • a5c8839 chore(deps): update dependency aquaproj/aqua-registry to v4.14.0 (#806)
  • fb14215 chore(deps): update dependency aquaproj/aqua-registry to v4.13.0 (#805)
  • 170addf chore(deps): update dependency aquaproj/aqua-registry to v4.12.0 (#804)
  • 9704702 fix(deps): update module github.com/urfave/cli/v2 to v2.25.5 (#803)
  • d49d8aa chore(deps): update dependency aquaproj/aqua-registry to v4.11.0 (#802)
  • 061c966 fix(deps): update module github.com/urfave/cli/v2 to v2.25.4 (#801)
  • a3ff5fc chore(deps): update dependency aquaproj/aqua-registry to v4.10.1 (#800)
  • d2b2185 chore(deps): update dependency aquaproj/aqua-registry to v4.10.0 (#799)
  • 62e7e72 chore(deps): update suzuki-shunsuke/go-test-full-workflow action to v0.2.2 (#798)
  • ed2b298 Merge pull request #797 from suzuki-shunsuke/renovate/suzuki-shunsuke-go-release-workflow-0.x
  • fb3e9da chore(deps): update suzuki-shunsuke/go-release-workflow action to v0.4.2
  • 509ab6f Merge pull request #796 from suzuki-shunsuke/renovate/aquaproj-aqua-registry-4.x
  • 07b0f8a chore(aqua): update aqua-checksums.json
  • 84ec9f2 chore(deps): update dependency aquaproj/aqua-registry to v4.9.0

v4.4.1

23 May 11:13
v4.4.1
86a03ac
Compare
Choose a tag to compare

Pull Requests | Issues | v4.4.0...v4.4.1

Fixes

#795 Propagate the signal such as SIGINT to terraform command properly for graceful shutdown

exec.CommandContext exits a command by SIGKILL immediately, so the command can't exit gracefully. So let's use suzuki-shunsuke/go-timeout instead.
go-timeout exits a command by SIGINT gracefully.

Reference

Test

hello.sh

#!/usr/bin/env bash

set -eu
set -o pipefail

trap 'echo trapped.' 2

sleep 60

AS IS

$ tfcmt -v     
tfcmt version 4.4.0 (5e9bc7fece716d7e892b273c1a7a2103273a7f9c)

$ tfcmt plan -- bash hello.sh
^CERRO[0002] remove labels                                 error="context canceled" program=tfcmt
context canceled

echo trapped. isn't executed.

TO BE

$ tfcmt plan -- bash hello.sh              
^Ctrapped.
ERRO[0001] remove labels                                 error="context canceled" program=tfcmt
context canceled

echo trapped. is executed.