A team edits the source of an existing module block to point at a new registry version, then runs 'terraform plan' straight away without re-running init. What is the most likely outcome?
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "5.1.0"
}- AThe plan silently uses the newly requested version because Terraform downloads modules automatically at plan time.
- BThe plan proceeds using the previously installed version and prints no warning, because the source change takes effect only on the next apply.
- CThe plan errors and asks the practitioner to run 'terraform init' because the module version currently installed does not satisfy the changed configuration. Correct
- DTerraform automatically re-runs init as part of plan, downloads the new version, and continues without any prompt.
Why A is wrong: This assumes plan performs retrieval, but module installation happens during init, so plan does not fetch the new version on its own.
Why B is wrong: It is tempting to think Terraform quietly keeps the old module, but it detects that the installed module no longer matches the configuration and stops rather than proceeding silently.
Why C is correct: Module retrieval is an init-time step, so a changed source or version that is not yet installed causes plan to fail and direct the user to run init first.
Why D is wrong: Plan never triggers init implicitly; the two are distinct commands, so Terraform will not fetch modules or providers as a side effect of planning.