McAfee-Secured Website

Exam Bundle

Exam Code: Terraform Associate 004

Exam Name HashiCorp Certified: Terraform Associate (004)

Certification Provider: HashiCorp

Corresponding Certification: Terraform Associate

HashiCorp Terraform Associate 004 Bundle $19.99

100% HashiCorp Terraform Associate 004 Guaranteed Success With Testking Training Materials

Get Real Terraform Associate 004 Exam Questions & Expert Verified Answers as Experienced on the Real Exam!

  • Questions & Answers

    Terraform Associate 004 Questions & Answers

    167 Questions & Answers

    The ultimate exam preparation tool, Questions & Answers mirrors the actual Terraform Associate 004 exam while allowing you to hone and measure every aspect of your test-taking ability.

  • Study Guide

    Terraform Associate 004 Study Guide

    285 PDF Pages

    Developed by industry experts, this 285-page guide spells out in painstaking detail all of the information you need to ace Terraform Associate 004 exam.

HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests

Satisfaction Guaranteed

Money Back Guarantee

Testking provides hassle-free money back guarantee with our products. That is because we have 100% trust in the abilities of our professional and experience product team, and our record is a proof of that.

99.6% PASS RATE
Total Cost: $154.98
Bundle Price: $134.99

Purchase Individually

  • Questions & Answers

    Questions & Answers

    167 Questions

    $124.99
  • Study Guide

    Study Guide

    285 PDF Pages

    $29.99

HashiCorp Terraform Associate 004 Practice Test 32

Question 310

An acceptance reviewer at Clearwater Systems must validate the fix for: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. Which observation best confirms that the proposed correction worked?

  1. A no-change review leaves existing managed resources in place while detecting only an intentionally altered configuration field.
  2. The evaluated collection excludes disabled records and retains the correct keyed or ordered values.
  3. Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.
  4. The second job waits or exits according to policy and never corrupts the first job's state write.

Explanation

Correct Answer

C:

Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership. This directly verifies the corrective action: Give the bucket a single responsible resource owner and let other configurations consume a data lookup or approved outputs. The measured result specifically addresses the failure at Clearwater Systems: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes.

Incorrect Answers

A:

A no-change review leaves existing managed resources in place while detecting only an intentionally altered configuration field. This evidence would validate a DIFFERENT correction: Explain that Terraform declares desired manageable resources and reconciles them through provider APIs and tracked state. That different correction addresses: A service owner believes infrastructure as code requires every physical device to be recreated from scratch during each deployment. It does not establish that the Clearwater Systems issue has been corrected: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The relevant measured outcome is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

B:

The evaluated collection excludes disabled records and retains the correct keyed or ordered values. This evidence would validate a DIFFERENT correction: Use a for expression with a deliberate filtering condition to produce only selected items. That different correction addresses: A team assumes a for expression automatically filters unwanted records without an if clause. It does not establish that the Clearwater Systems issue has been corrected: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The relevant measured outcome is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

D:

The second job waits or exits according to policy and never corrupts the first job's state write. This evidence would validate a DIFFERENT correction: Use the documented lock-timeout behavior or release scheduling instead of disabling locking. That different correction addresses: A long plan times out waiting for the state lock while another maintenance run legitimately holds it. It does not establish that the Clearwater Systems issue has been corrected: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The relevant measured outcome is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

Question 311

At Valleyline Technology, the Terraform review finds this specific problem: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. Which proposed fix addresses the reported root cause?

  1. Run a normal refreshed plan and decide whether to restore configuration or accept the change.
  2. Use TF_LOG_PATH with an appropriate TF_LOG level and store the resulting diagnostic file securely.
  3. Use a map(string) or suitable object keyed by environment name to preserve explicit associations.
  4. Give the bucket a single responsible resource owner and let other configurations consume a data lookup or approved outputs.

Explanation

Correct Answer

D:

Give the bucket a single responsible resource owner and let other configurations consume a data lookup or approved outputs. This is targeted to the observed Terraform issue: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. At Valleyline Technology, the acceptance criterion is not merely a valid plan; the team should verify: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

Incorrect Answers

A:

Run a normal refreshed plan and decide whether to restore configuration or accept the change. This would be suitable for a DIFFERENT Terraform problem: An operator manually changes a remote subnet rule but expects a normal saved state file alone to reveal it without provider refresh. It does not directly resolve the Valleyline Technology failure: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The required acceptance evidence instead is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

B:

Use TF_LOG_PATH with an appropriate TF_LOG level and store the resulting diagnostic file securely. This would be suitable for a DIFFERENT Terraform problem: An engineer wants to write Terraform diagnostic output to a file but redirects all deployment console output into a public artifact. It does not directly resolve the Valleyline Technology failure: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The required acceptance evidence instead is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

C:

Use a map(string) or suitable object keyed by environment name to preserve explicit associations. This would be suitable for a DIFFERENT Terraform problem: A network module uses a list to represent environment-name-to-CIDR pairs and repeatedly assigns the wrong CIDR by index. It does not directly resolve the Valleyline Technology failure: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The required acceptance evidence instead is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

Question 312

After corrective work at Valleyline Technology, a reviewer requests measurable proof for: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. What result would demonstrate that the identified problem is actually resolved?

  1. Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.
  2. The selected private log file captures the required diagnostics and is absent from public build artifacts.
  3. The plan identifies the out-of-band rule change for review rather than silently assuming no drift.
  4. Lookup of a named environment yields its intended CIDR independently of input ordering.

Explanation

Correct Answer

A:

Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership. This directly verifies the corrective action: Give the bucket a single responsible resource owner and let other configurations consume a data lookup or approved outputs. The measured result specifically addresses the failure at Valleyline Technology: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes.

Incorrect Answers

B:

The selected private log file captures the required diagnostics and is absent from public build artifacts. This evidence would validate a DIFFERENT correction: Use TF_LOG_PATH with an appropriate TF_LOG level and store the resulting diagnostic file securely. That different correction addresses: An engineer wants to write Terraform diagnostic output to a file but redirects all deployment console output into a public artifact. It does not establish that the Valleyline Technology issue has been corrected: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The relevant measured outcome is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

C:

The plan identifies the out-of-band rule change for review rather than silently assuming no drift. This evidence would validate a DIFFERENT correction: Run a normal refreshed plan and decide whether to restore configuration or accept the change. That different correction addresses: An operator manually changes a remote subnet rule but expects a normal saved state file alone to reveal it without provider refresh. It does not establish that the Valleyline Technology issue has been corrected: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The relevant measured outcome is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

D:

Lookup of a named environment yields its intended CIDR independently of input ordering. This evidence would validate a DIFFERENT correction: Use a map(string) or suitable object keyed by environment name to preserve explicit associations. That different correction addresses: A network module uses a list to represent environment-name-to-CIDR pairs and repeatedly assigns the wrong CIDR by index. It does not establish that the Valleyline Technology issue has been corrected: A migration design unintentionally manages the same existing bucket in two root modules and causes competing changes. The relevant measured outcome is: Only one state contains the managed bucket address while consumers read the shared identifier without duplicate ownership.

Question 313

At Brightside Cloud Works, the Terraform review finds this specific problem: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. What is the most appropriate corrective action for this Terraform scenario?

  1. Review destination project membership, variables, and project/workspace permissions before and after moving the workspace.
  2. Treat pulled state as potentially sensitive and restrict its storage, sharing, and retention.
  3. Use an appropriate provider data source to query the published zone without assuming lifecycle ownership.
  4. Add an input-variable validation condition enforcing a positive capacity with a clear error message.

Explanation

Correct Answer

C:

Use an appropriate provider data source to query the published zone without assuming lifecycle ownership. This is targeted to the observed Terraform issue: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. At Brightside Cloud Works, the acceptance criterion is not merely a valid plan; the team should verify: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Incorrect Answers

A:

Review destination project membership, variables, and project/workspace permissions before and after moving the workspace. This would be suitable for a DIFFERENT Terraform problem: A security team moves a workspace between HCP Terraform projects but fails to review inherited access consequences. It does not directly resolve the Brightside Cloud Works failure: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The required acceptance evidence instead is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

B:

Treat pulled state as potentially sensitive and restrict its storage, sharing, and retention. This would be suitable for a DIFFERENT Terraform problem: A reviewer runs terraform state pull and stores the resulting JSON in a public issue tracker. It does not directly resolve the Brightside Cloud Works failure: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The required acceptance evidence instead is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

D:

Add an input-variable validation condition enforcing a positive capacity with a clear error message. This would be suitable for a DIFFERENT Terraform problem: A module accepts a storage capacity variable of -5 and should fail before attempting an API call. It does not directly resolve the Brightside Cloud Works failure: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The required acceptance evidence instead is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Question 314

After corrective work at Brightside Cloud Works, a reviewer requests measurable proof for: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. Which controlled check would validate the remediation?

  1. Only intended teams retain access and the workspace's new project is visible in its settings.
  2. The inspected state stays within approved secure storage and an external viewer cannot retrieve it.
  3. A negative test input is rejected and a valid capacity proceeds to planning.
  4. The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Explanation

Correct Answer

D:

The refreshed plan contains only a lookup for that zone and no zone creation or replacement. This directly verifies the corrective action: Use an appropriate provider data source to query the published zone without assuming lifecycle ownership. The measured result specifically addresses the failure at Brightside Cloud Works: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone.

Incorrect Answers

A:

Only intended teams retain access and the workspace's new project is visible in its settings. This evidence would validate a DIFFERENT correction: Review destination project membership, variables, and project/workspace permissions before and after moving the workspace. That different correction addresses: A security team moves a workspace between HCP Terraform projects but fails to review inherited access consequences. It does not establish that the Brightside Cloud Works issue has been corrected: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The relevant measured outcome is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

B:

The inspected state stays within approved secure storage and an external viewer cannot retrieve it. This evidence would validate a DIFFERENT correction: Treat pulled state as potentially sensitive and restrict its storage, sharing, and retention. That different correction addresses: A reviewer runs terraform state pull and stores the resulting JSON in a public issue tracker. It does not establish that the Brightside Cloud Works issue has been corrected: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The relevant measured outcome is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

C:

A negative test input is rejected and a valid capacity proceeds to planning. This evidence would validate a DIFFERENT correction: Add an input-variable validation condition enforcing a positive capacity with a clear error message. That different correction addresses: A module accepts a storage capacity variable of -5 and should fail before attempting an API call. It does not establish that the Brightside Cloud Works issue has been corrected: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The relevant measured outcome is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Question 315

The infrastructure engineers at Bayview Systems document the following failure during a change review: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. Which action would best restore the intended infrastructure-as-code workflow?

  1. Use an appropriate provider data source to query the published zone without assuming lifecycle ownership.
  2. Verify workspace, backend, targets, and identities and require a destructive-change approval gate before destroy.
  3. Define an output in the child module and, if needed, forward it through a root output.
  4. Configure appropriately protected workspace environment variables or dynamic provider credentials for remote execution.

Explanation

Correct Answer

A:

Use an appropriate provider data source to query the published zone without assuming lifecycle ownership. This is targeted to the observed Terraform issue: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. At Bayview Systems, the acceptance criterion is not merely a valid plan; the team should verify: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Incorrect Answers

B:

Verify workspace, backend, targets, and identities and require a destructive-change approval gate before destroy. This would be suitable for a DIFFERENT Terraform problem: A production operator runs terraform destroy from the wrong workspace and nearly removes a shared network. It does not directly resolve the Bayview Systems failure: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The required acceptance evidence instead is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

C:

Define an output in the child module and, if needed, forward it through a root output. This would be suitable for a DIFFERENT Terraform problem: A child module computes an application endpoint, but the root stack cannot expose it to deployment automation. It does not directly resolve the Bayview Systems failure: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The required acceptance evidence instead is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

D:

Configure appropriately protected workspace environment variables or dynamic provider credentials for remote execution. This would be suitable for a DIFFERENT Terraform problem: A team creates HCP Terraform workspaces but leaves required environment credentials on the developer's laptop only. It does not directly resolve the Bayview Systems failure: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The required acceptance evidence instead is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Question 316

The reliability team at Bayview Systems is closing an incident described as follows: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. Which observation best confirms that the proposed correction worked?

  1. After apply, terraform output returns the expected endpoint from the managed resource.
  2. The refreshed plan contains only a lookup for that zone and no zone creation or replacement.
  3. A remote run authenticates to approved infrastructure without reading a developer's local secret files.
  4. The incorrect environment is detected before any deletion and only the intended sandbox is targeted.

Explanation

Correct Answer

B:

The refreshed plan contains only a lookup for that zone and no zone creation or replacement. This directly verifies the corrective action: Use an appropriate provider data source to query the published zone without assuming lifecycle ownership. The measured result specifically addresses the failure at Bayview Systems: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone.

Incorrect Answers

A:

After apply, terraform output returns the expected endpoint from the managed resource. This evidence would validate a DIFFERENT correction: Define an output in the child module and, if needed, forward it through a root output. That different correction addresses: A child module computes an application endpoint, but the root stack cannot expose it to deployment automation. It does not establish that the Bayview Systems issue has been corrected: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The relevant measured outcome is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

C:

A remote run authenticates to approved infrastructure without reading a developer's local secret files. This evidence would validate a DIFFERENT correction: Configure appropriately protected workspace environment variables or dynamic provider credentials for remote execution. That different correction addresses: A team creates HCP Terraform workspaces but leaves required environment credentials on the developer's laptop only. It does not establish that the Bayview Systems issue has been corrected: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The relevant measured outcome is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

D:

The incorrect environment is detected before any deletion and only the intended sandbox is targeted. This evidence would validate a DIFFERENT correction: Verify workspace, backend, targets, and identities and require a destructive-change approval gate before destroy. That different correction addresses: A production operator runs terraform destroy from the wrong workspace and nearly removes a shared network. It does not establish that the Bayview Systems issue has been corrected: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. The relevant measured outcome is: The refreshed plan contains only a lookup for that zone and no zone creation or replacement.

Question 317

The infrastructure engineers at Arbor Cloud Systems document the following failure during a change review: 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. How should the Terraform engineer correct this specific failure?

  1. Select the service's correct Terraform provider and resource or data source type instead of assuming provider interchangeability.
  2. Use terraform init -backend=false for an appropriate backend-free local initialization.
  3. Use a for expression with a deliberate filtering condition to produce only selected items.
  4. Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation.

Explanation

Correct Answer

D:

Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation. This is targeted to the observed Terraform issue: 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. At Arbor Cloud Systems, the acceptance criterion is not merely a valid plan; the team should verify: The graph plans the creation and downstream reference without an early failing data-source lookup.

Incorrect Answers

A:

Select the service's correct Terraform provider and resource or data source type instead of assuming provider interchangeability. This would be suitable for a DIFFERENT Terraform problem: A platform engineer uses a cloud-specific resource type to control an unrelated SaaS service and receives unsupported-argument errors. It does not directly resolve the Arbor Cloud Systems failure: 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 required acceptance evidence instead is: The graph plans the creation and downstream reference without an early failing data-source lookup.

B:

Use terraform init -backend=false for an appropriate backend-free local initialization. This would be suitable for a DIFFERENT Terraform problem: A team needs to initialize providers without contacting the configured remote backend during a local syntax-only preflight. It does not directly resolve the Arbor Cloud Systems failure: 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 required acceptance evidence instead is: The graph plans the creation and downstream reference without an early failing data-source lookup.

C:

Use a for expression with a deliberate filtering condition to produce only selected items. This would be suitable for a DIFFERENT Terraform problem: A team assumes a for expression automatically filters unwanted records without an if clause. It does not directly resolve the Arbor Cloud Systems failure: 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 required acceptance evidence instead is: The graph plans the creation and downstream reference without an early failing data-source lookup.

Question 318

The reliability team at Arbor Cloud Systems is closing an incident described as follows: 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 verification outcome is the strongest evidence of the required correction?

  1. The graph plans the creation and downstream reference without an early failing data-source lookup.
  2. The evaluated collection excludes disabled records and retains the correct keyed or ordered values.
  3. Provider and module dependencies initialize while the remote backend is not configured during that preflight.
  4. Initialization loads the intended provider and configuration validation accepts the supported SaaS resource schema.

Explanation

Correct Answer

A:

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 Arbor Cloud Systems: 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

B:

The evaluated collection excludes disabled records and retains the correct keyed or ordered values. This evidence would validate a DIFFERENT correction: Use a for expression with a deliberate filtering condition to produce only selected items. That different correction addresses: A team assumes a for expression automatically filters unwanted records without an if clause. It does not establish that the Arbor Cloud Systems 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.

C:

Provider and module dependencies initialize while the remote backend is not configured during that preflight. This evidence would validate a DIFFERENT correction: Use terraform init -backend=false for an appropriate backend-free local initialization. That different correction addresses: A team needs to initialize providers without contacting the configured remote backend during a local syntax-only preflight. It does not establish that the Arbor Cloud Systems 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.

D:

Initialization loads the intended provider and configuration validation accepts the supported SaaS resource schema. This evidence would validate a DIFFERENT correction: Select the service's correct Terraform provider and resource or data source type instead of assuming provider interchangeability. That different correction addresses: A platform engineer uses a cloud-specific resource type to control an unrelated SaaS service and receives unsupported-argument errors. It does not establish that the Arbor Cloud Systems 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.

Question 319

Granite Software Works is preparing a controlled Terraform update after identifying this fault: 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. What is the most appropriate corrective action for this Terraform scenario?

  1. Declare or generate suitable resource configuration using the supported import workflow, then review required attributes.
  2. Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation.
  3. Use a dynamic block for supported repeated nested blocks rather than duplicating boilerplate.
  4. Configure backend storage separately from provider authentication and target settings.

Explanation

Correct Answer

B:

Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation. This is targeted to the observed Terraform issue: 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. At Granite Software Works, the acceptance criterion is not merely a valid plan; the team should verify: The graph plans the creation and downstream reference without an early failing data-source lookup.

Incorrect Answers

A:

Declare or generate suitable resource configuration using the supported import workflow, then review required attributes. This would be suitable for a DIFFERENT Terraform problem: 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 directly resolve the Granite Software Works failure: 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 required acceptance evidence instead is: The graph plans the creation and downstream reference without an early failing data-source lookup.

C:

Use a dynamic block for supported repeated nested blocks rather than duplicating boilerplate. This would be suitable for a DIFFERENT Terraform problem: An environment-tag list must be rendered into multiple nested provider blocks, but the engineer copies and edits blocks by hand. It does not directly resolve the Granite Software Works failure: 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 required acceptance evidence instead is: The graph plans the creation and downstream reference without an early failing data-source lookup.

D:

Configure backend storage separately from provider authentication and target settings. This would be suitable for a DIFFERENT Terraform problem: An engineer assumes setting a local backend changes provider credentials and account identity. It does not directly resolve the Granite Software Works failure: 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 required acceptance evidence instead is: The graph plans the creation and downstream reference without an early failing data-source lookup.

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?

  1. The imported object has matching managed configuration and no unexplained destructive plan is produced.
  2. The state path changes as intended while resource API operations still use the explicitly configured provider identity.
  3. The graph plans the creation and downstream reference without an early failing data-source lookup.
  4. Validation accepts the generated nesting and the plan shows one nested block per intended input item.

Explanation

Correct Answer

C:

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

A:

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.

B:

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.

D:

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.