A module maintainer deletes an output named subnet_ids that looked unused inside the module and publishes the change as a patch release. Several root configurations reference module.network.subnet_ids. What happens to those callers, and how should such a removal be handled?
Select an answer to reveal the explanation.
Short Explanation
Outputs are the module's promises to whoever calls it. Break a promise in a patch release and every caller's plan blows up, so you warn first and remove only when you bump the major version.
Full Explanation
A module's input variables and outputs together form its public interface. When a root module references module.network.subnet_ids and the module no longer declares that output, Terraform reports an error during validation or planning that the module has no such attribute, so every caller is broken by the upgrade. Removing an output is therefore a breaking change under semantic versioning and belongs in a major release, preceded by a deprecation period. Terraform 1.15 supports a deprecated argument on output blocks in child modules, which shows callers a warning with the maintainer's message whenever they reference the output, giving them time to migrate. Terraform does not resolve references to outputs that are no longer declared from values stored in state; references are checked against the current configuration. It also does not silently substitute null for a missing output; that would hide genuine errors. Treating outputs as internal because they are computed misunderstands the contract: callers depend on them exactly as they depend on inputs. Exam caveat: the deprecated argument is valid only on outputs of child modules, not in the root module. Operational check: before removing any output, search consuming repositories for references to it, publish a deprecation, and confirm the warning appears in a consumer plan.