Question 200
A Terraform associate evaluates: A configuration's nested block name does not match the provider's expected schema. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A configuration's nested block name does not match the provider's expected schema. The directly relevant Terraform response is: Correct unresolved references and schema errors reported by terraform validate instead of attempting an apply to discover them. This addresses the related failure mode: A typo in a resource reference or invalid argument can prevent Terraform from constructing a valid graph. Validate the result by checking: A subsequent validate succeeds with the intended resource names and provider schema. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A configuration's nested block name does not match the provider's expected schema. The acceptance evidence is: A subsequent validate succeeds with the intended resource names and provider schema. It verifies the corrective approach (Correct unresolved references and schema errors reported by terraform validate instead of attempting an apply to discover them.) and controls the risk: A typo in a resource reference or invalid argument can prevent Terraform from constructing a valid graph. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
Run terraform validate to check configuration syntax and internal consistency, then use plan to evaluate actual infrastructure differences. This is relevant to terraform validate versus provider-aware plan (official objective 3c). Its distinct failure risk is that passing validate does not prove credentials, permissions or remote object behavior will succeed at apply. The present question tests Detect invalid references and values, which this measure alone does not establish.
A deliberately unformatted file makes the check fail and a formatted file passes without modification. This addresses Formatting check in CI (official objective 3g). The separate hazard is that automatically rewriting formatting during a read-only CI check can produce untracked repository changes. It does not by itself satisfy the case-specific requirement for Detect invalid references and values.
A consistently formatted file can still contain invalid references or unsupported provider attributes. This does not provide the required Detect invalid references and values action-and-evidence pair.