suzuki-shunsuke / tfcmt

Fork of mercari/tfnotify. tfcmt enhances tfnotify in many ways, including Terraform >= v0.15 support and advanced formatting options
https://suzuki-shunsuke.github.io/tfcmt/
Other
404 stars 45 forks source link

Even if only 'moved' is used, tfcmt reports it as an 'add-or-update' label. #1312

Closed guitarrapc closed 1 month ago

guitarrapc commented 2 months ago

Feature Overview

If there are no changes on resources, tfcmt should report it as anno-changes label.

Why is the feature needed?

When no moved block is used and no changes happen, tfcmt report no-changes label. However if I use moved block and result was no changes, tfcmt reports it as an add-or-update label. I would expect tfcmt to report no-changes, because moved block is just a refactoring code and no resource changes are happen.

Following to official doc, tfcmt's label is tareget to resource change identification, NOT state change... I believe.

no-changes: there is no resource to be changed
add-or-update: there are resources to be created or updated but there is no resource to be destroyed or recreated
destroy: there are resources to be destroyed or recreated

Example Code

$ tfcmt plan -patch -- terraform plan -no-color

Configuration

moved {
  from = old_module.reousrce.main
  to   = new_module.resource.main
}

note

If tfcmt is looking state change, then current behaiviour is correct.

suzuki-shunsuke commented 1 month ago

Duplicate of #358

guitarrapc commented 1 month ago

Should I close?

suzuki-shunsuke commented 1 month ago

Let me close.