opentofu/opentofu

tofu shows "no changes" when output sensitivity has changed

Open

#2.680 aberto em 17 de abr. de 2025

Ver no GitHub
 (11 comments) (0 reactions) (0 assignees)Go (1.237 forks)batch import
acceptedenhancementhelp wanted

Métricas do repositório

Stars
 (28.648 stars)
Métricas de merge de PR
 (Mesclagem média 3d 5h) (79 fundiu PRs em 30d)

Description

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

Guia do colaborador