sincecutoff.com
← all changes

Terraform variable and output deprecation warnings

Introduced 2026-04-29 · score 0.96

HOW TO USE IT

When a variable or child-module output is deprecated, add a `deprecated` string explaining why; Terraform displays the reason when a value is passed to the variable or a consumer uses the output. [Variable reference](https://developer.hashicorp.com/terraform/language/block/variable) [Output reference](https://developer.hashicorp.com/terraform/language/block/output)

variable "<name>" { type = <type> deprecated = "<reason>" }
output "<name>" { value = <expression> deprecated = "<reason>" }

WHY THIS HELPS

Mark a variable or output as deprecated in a Terraform configuration.

REQUIREMENTS AND LIMITATIONS

  • Version: 1.15.0
  • variable.deprecated: String explaining why the variable is deprecated; Terraform displays the reason when it is set in a root module or a child-module caller passes it a value.
  • output.deprecated: String explaining why the output is deprecated. Valid only in child modules; consumers see the reason when they use the output.
  • output.value (required): Expression whose result Terraform returns for the output.
  • variable.type: Type constraint for the variable value.
  • Prerequisite: Deprecated variables and outputs require Terraform v1.15 or later.
  • Prerequisite: The output `deprecated` argument is valid only on outputs in child modules.
  • Docs conflict: The release note says warnings occur when a deprecated output is referenced. The current output reference specifies that only module consumers see the deprecation reason, and limits the argument to child-module outputs. The current docs are for v1.16.x; no v1.15-specific output reference was found to verify whether behavior differs.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card