You just scaled your VM infrastructure and realize you set the count variable to the wrong value. You correct the value and save your change. What must you do next to make your infrastructure match your configuration?
A.
Reinitialize because your configuration has changed.
B.
Inspect all Terraform outputs to make sure they are correct.
C.
Inspect your Terraform state because you want to change it.
D.
Run terraform apply and confirm the planned changes.
Rationale for Correct Answer: Changing count changes the desired number of resource instances. To reconcile real infrastructure with the updated configuration, you run terraform apply (typically after reviewing the plan). Terraform will create/destroy instances as needed to match the new count value.
Analysis of Incorrect Options (Distractors):
A: Incorrect. terraform init is required when you add/change providers, modules, or backend configuration—not for simple variable value changes.
B: Incorrect. Outputs do not change infrastructure; they only display derived values.
C: Incorrect. You generally should not edit state to reflect intended changes; you apply configuration changes and let Terraform update state.
Key Concept: Terraform workflow: update configuration → plan/apply to converge infrastructure to desired state.
[Reference:Use Terraform to Manage Infrastructure — plan/apply lifecycle and how configuration changes are enacted., ====================]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit