Why is pinning a registry module to a specific version considered good practice for deliberate upgrades?
- AIt makes Terraform fetch the newest available release on every init so the configuration stays current automatically.
- BIt removes the need to run terraform init after the module author publishes a new release.
- CIt gives repeatable installs, so a module upgrade happens only when someone changes the constraint and reviews the new version. Correct
- DIt allows the module to skip provider version resolution because the pinned module already carries compatible providers.
Why A is wrong: This describes the opposite behaviour; automatic newest fetching is what pinning is meant to prevent, since it can introduce unreviewed changes.
Why B is wrong: This is tempting because pinning does reduce churn, but a new release still requires editing the constraint and re-initialising to adopt it, so init is not eliminated.
Why C is correct: Pinning fixes the resolved version across runs and machines, so a version change is an explicit, reviewable edit rather than an implicit shift when the registry gains a release.
Why D is wrong: Module version pinning does not bypass provider constraint resolution; providers are still resolved separately during init regardless of how the module is pinned.