Skip to content

Conversation

@DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Dec 11, 2025

PR Chain

Variables can be deprecated through the deprecated attribute. If set the variable will emit a diagnostic if a values is passed to it. This entails both root level and module variables.

Outputs can be deprecated through the deprecated attribute as well. If set wherever the value is used a diagnostic will be emitted. Root level outputs can not be deprecated. The only acceptable usage of a deprecated output is another deprecated output (forwarding the deprecation to the module user).

If modules not under your control have deprecation warnings you can add a suppress_deprecations_warnigns attribute to the module call in question to silence any deeply nested warnings.

For the full end-to-end implementation see #37795, this PR splits up that work into more reviewable chunks.

Fixes #

Target Release

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@DanielMSchmidt DanielMSchmidt requested a review from a team as a code owner December 11, 2025 12:49
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from 5402a27 to 008e320 Compare December 11, 2025 12:49
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from 82b8b89 to 4c5d964 Compare December 11, 2025 12:49
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch 2 times, most recently from 8b295d5 to 2746850 Compare December 12, 2025 13:36
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch 2 times, most recently from 6c6a610 to 42cee35 Compare January 12, 2026 16:01
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch 4 times, most recently from fed3ea9 to a9cb1c9 Compare January 21, 2026 14:35
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from 2746850 to 0cf6f0a Compare January 26, 2026 08:49
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from a9cb1c9 to f877341 Compare January 26, 2026 08:49
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from 0cf6f0a to af549ab Compare January 27, 2026 12:58
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from f877341 to d79bf08 Compare January 27, 2026 13:04
jbardin
jbardin previously approved these changes Feb 2, 2026
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch from af549ab to 5d9ba5b Compare February 3, 2026 12:26
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from d79bf08 to 0ae6944 Compare February 3, 2026 12:26
@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-surpression-tracking branch 3 times, most recently from 13fe64c to d69c14d Compare February 3, 2026 14:22
Base automatically changed from add-deprecation-surpression-tracking to main February 3, 2026 14:39
@DanielMSchmidt DanielMSchmidt dismissed jbardin’s stale review February 3, 2026 14:39

The base branch was changed.

Variables can be deprecated through the `deprecated` attribute. If set the variable
will emit a diagnostic if a values is passed to it. This entails both root level and
module variables.

Outputs can be deprecated through the `deprecated` attribute as well. If set wherever
the value is used a diagnostic will be emitted. Root level outputs can not be deprecated.
The only acceptable usage of a deprecated output is another deprecated output (forwarding
the deprecation to the module user).

If modules not under your control have deprecation warnings you can add a `suppress_deprecations_warnigns`
attribute to the module call in question to silence any deeply nested warnings.
I decided against it before since a lot of tests were panicing, but after consulting with peers I found out the tests were just minimally set up and before it was just fine without the current scope being set. Now we require it to be set as it would in a normal execution therefore I had to add a bit of setup to the tests
#38006 is dealing with resource deprecation
@DanielMSchmidt DanielMSchmidt force-pushed the deprecations-in-variables-and-outputs branch from 0ae6944 to 51c8cb5 Compare February 3, 2026 14:41
@DanielMSchmidt DanielMSchmidt merged commit c02223e into main Feb 3, 2026
14 of 15 checks passed
@DanielMSchmidt DanielMSchmidt deleted the deprecations-in-variables-and-outputs branch February 3, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants