Skip to content
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

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

Closed
guitarrapc opened this issue Jun 14, 2024 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@guitarrapc
Copy link

guitarrapc commented Jun 14, 2024

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.

@guitarrapc guitarrapc added the enhancement New feature or request label Jun 14, 2024
@suzuki-shunsuke
Copy link
Owner

Duplicate of #358

@suzuki-shunsuke suzuki-shunsuke marked this as a duplicate of #358 Jul 11, 2024
@guitarrapc
Copy link
Author

Should I close?

@suzuki-shunsuke
Copy link
Owner

Let me close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants