Question 320
Granite Software Works requires independent evidence before signing off this Terraform correction: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup. Which controlled check would validate the remediation?
Explanation
Correct Answer
The graph plans the creation and downstream reference without an early failing data-source lookup. This directly verifies the corrective action: Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation. The measured result specifically addresses the failure at Granite Software Works: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup.
Incorrect Answers
The imported object has matching managed configuration and no unexplained destructive plan is produced. This evidence would validate a DIFFERENT correction: Declare or generate suitable resource configuration using the supported import workflow, then review required attributes. That different correction addresses: A consultant attempts terraform import for an object that has no resource configuration and expects full valid HCL to be generated automatically. It does not establish that the Granite Software Works issue has been corrected: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup. The relevant measured outcome is: The graph plans the creation and downstream reference without an early failing data-source lookup.
The state path changes as intended while resource API operations still use the explicitly configured provider identity. This evidence would validate a DIFFERENT correction: Configure backend storage separately from provider authentication and target settings. That different correction addresses: An engineer assumes setting a local backend changes provider credentials and account identity. It does not establish that the Granite Software Works issue has been corrected: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup. The relevant measured outcome is: The graph plans the creation and downstream reference without an early failing data-source lookup.
Validation accepts the generated nesting and the plan shows one nested block per intended input item. This evidence would validate a DIFFERENT correction: Use a dynamic block for supported repeated nested blocks rather than duplicating boilerplate. That different correction addresses: An environment-tag list must be rendered into multiple nested provider blocks, but the engineer copies and edits blocks by hand. It does not establish that the Granite Software Works issue has been corrected: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup. The relevant measured outcome is: The graph plans the creation and downstream reference without an early failing data-source lookup.