You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"null_resource""bar" {}
moved {
from=null_resource.footo=null_resource.bar
}
And run tfcmt plan.
$ tfcmt plan -- terraform plannull_resource.bar: Refreshing state... [id=1968536679283731966]Terraform will perform the following actions: # null_resource.foo has moved to null_resource.bar resource "null_resource" "bar" { id = "1968536679283731966" }Plan: 0 to add, 0 to change, 0 to destroy.─────────────────────────────────────────────────────────────────────────────Note: You didn't use the -out option to save this plan, so Terraform can'tguarantee to take exactly these actions if you run "terraform apply" now.
Expected Behavior
The plan result is no change.
Actual Behavior
tfcmt treats the result as add-or-update, so tfcmt adds a pull request label add-or-update.
Note
The exit code of terraform plan -detailed-exitcode is not zero but two.
-detailed-exitcode Return detailed exit codes when the command exits. This
will change the meaning of exit codes to:
0 - Succeeded, diff is empty (no changes)
1 - Errored
2 - Succeeded, there is a diff
$ terraform plan -detailed-exitcod
$ echo$?2
It means Terraform itself treats the result as there is a diff.
So tfcmt's current behavior isn't wrong.
But I guess it would not be intuitive.
The text was updated successfully, but these errors were encountered:
Versions
How to reproduce
Run
terraform apply
to create.main.tf
$ terraform apply -auto-approve
Then update main.tf using moved block.
And run
tfcmt plan
.Expected Behavior
The plan result is
no change
.Actual Behavior
tfcmt treats the result as
add-or-update
, so tfcmt adds a pull request labeladd-or-update
.Note
The exit code of
terraform plan -detailed-exitcode
is not zero but two.It means Terraform itself treats the result as
there is a diff
.So tfcmt's current behavior isn't wrong.
But I guess it would not be intuitive.
The text was updated successfully, but these errors were encountered: