opentofu/opentofu

tofu shows "no changes" when output sensitivity has changed

Open

#2,680 建立於 2025年4月17日

在 GitHub 查看
 (10 留言) (0 反應) (1 負責人)Go (28,648 star) (1,237 fork)batch import
acceptedenhancementhelp wanted

描述

Community note

[!TIP] 👋 Hi there, OpenTofu community! The OpenTofu team prioritizes issues based on upvotes. Please make sure to upvote this issue and describe how it affects you in detail in the comments to show your support.

OpenTofu Version

Latest dev version from main:

OpenTofu v1.10.0-dev
on darwin_arm64

OpenTofu Configuration Files

output "a" {
  value = "a's value"
  # sensitive = true # <- this is the actual change to the configuration
}

Debug Output

Irrelevant for this case.

Expected Behavior

If I change the sensitivity of an output, I would expect to see that in the list of changes on tofu apply.

Actual Behavior

Running tofu apply results in "No changes. Your infrastructure matches the configuration." and a prompt to run an apply.

Steps to Reproduce

  1. Run tofu apply
  2. Change the sensitivity of an output
  3. Run tofu apply

Additional Context

I found this issue during the work on deprecation of module outputs (https://github.com/opentofu/opentofu/pull/2679). If the deprecated field ends up in the state, this issue would be relevant for changes in the deprecation of module outputs as well.

References

No response

貢獻者指南