A module maintainer plans to remove the input variable subnet_id in the next major version in favor of subnet_ids. The team wants every caller that still passes subnet_id to see a clear warning now, without breaking anyone's current plans. Which Terraform 1.15 feature should they use?
Select an answer to reveal the explanation.
Short Explanation
You want a polite tap on the shoulder, not a locked door. The deprecated argument prints your migration message whenever a caller passes the old input, and their plans still run.
Full Explanation
Terraform 1.15 introduced a deprecated argument for variable and output blocks. On a variable, it takes a string explaining why the input is deprecated, and Terraform shows that message as a warning when a root module sets the variable or when a module caller passes a value for it, while the plan continues normally. That fits a deprecation period exactly: callers are told what to change, and nothing breaks until the input is actually removed in the next major version. A validation block that fails whenever a value is set turns the warning into an error immediately, breaking every caller still passing subnet_id, which is the outcome the team wants to avoid. The sensitive argument redacts a value in plan and apply output; it does not warn anyone or signal deprecation. Text in a description appears in generated documentation but is not surfaced as a warning during plans, so callers who never reread the documentation will not notice it. Exam caveat: on output blocks the deprecated argument is valid only in child modules, and callers see the warning when they reference the output. Operational check: plan a caller that still passes subnet_id with the new module version, confirm the deprecation warning text appears, and confirm the plan otherwise completes.