Question 410
At Mapleridge Retail Infrastructure, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a root module is formatted correctly but child modules under nested folders retain unformatted expressions. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. What mechanism explains why the original approach fails?
Explanation
Correct Answer
Default formatting scope may not include every nested module directory. That mechanism distinguishes recursive formatting for modules in the Mapleridge Retail Infrastructure case. The corresponding appropriate correction is: Use terraform fmt -recursive from the appropriate repository root. The measurable acceptance test is: All nested Terraform configuration files pass the recursive formatting check.
Incorrect Answers
The offered principle describes: Formatting does not rewrite resource graph semantics or rename resource addresses. The situation in this question instead depends on: Default formatting scope may not include every nested module directory. These are different technical conditions.
This alternative is valid when initialization prepares the backend providers and child modules needed by Terraform. The facts here establish a different controlling reason: Default formatting scope may not include every nested module directory.
“State metadata does not replace architecture intent or application runtime documentation” reflects the mechanism: State metadata does not replace architecture intent or application runtime documentation. The actual reported symptoms are better explained by: Default formatting scope may not include every nested module directory.