Practice Exams:

HashiCorp Terraform Associate 004 Dumps

EXAM: HashiCorp Certified: Terraform Associate (004)
Verified By Experts
Premium Bundle
$40.00
$59.97 $99.97

Terraform Associate 004 Premium Bundle


  • Premium File 167 Questions & Answers
  • Training Course 118 Lectures
  • Study Guide 285 Pages

HashiCorp Terraform Associate 004 Practice Test 63

Question 620

A city infrastructure team is transitioning manually created test resources to Terraform while preserving an auditable import step. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Create an appropriate resource block for a preexisting authorized object and run terraform import with its correct resource address and provider-specific identifier. Verify: Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object.
  2. Implement: Set TF_LOG to an appropriate diagnostic level for a limited troubleshooting run and disable it after collecting a redacted log in a protected location. Verify: Reproduce a harmless provider initialization failure with temporary logging, confirm the relevant error is recorded and clear the log level afterward.
  3. Implement: Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. Verify: Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object.
  4. Implement: Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. Verify: Import a disposable pre-created object, inspect state and run plan to ensure the declared HCL does not propose unintended modifications.

Answer & Explanations

Correct answer: C

A.

The question is set in this situation: A city infrastructure team is transitioning manually created test resources to Terraform while preserving an auditable import step. The test would be relevant: Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object. But the offered implementation—Create an appropriate resource block for a preexisting authorized object and run terraform import with its correct resource address and provider-specific identifier.—addresses “Import an existing managed object using the Terraform CLI”. The action needed here is: Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration.

B.

This action/test pair addresses “Enable diagnostic Terraform logging only while investigating faults”. Set TF_LOG to an appropriate diagnostic level for a limited troubleshooting run and disable it after collecting a redacted log in a protected location. Reproduce a harmless provider initialization failure with temporary logging, confirm the relevant error is recorded and clear the log level afterward. The case instead calls for: Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration.

C.

The question is set in this situation: A city infrastructure team is transitioning manually created test resources to Terraform while preserving an auditable import step. Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. Confirm it through this test: Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object. Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command.

D.

The question is set in this situation: A city infrastructure team is transitioning manually created test resources to Terraform while preserving an auditable import step. The action is applicable: Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. But its proposed test—Import a disposable pre-created object, inspect state and run plan to ensure the declared HCL does not propose unintended modifications.—addresses “Import an existing managed object using the Terraform CLI”. This requirement is confirmed instead by: Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object.

Question 621

A retail IT team needs to identify which resources a specific Terraform workspace actually manages before proposing cleanup. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure.
  2. Set TF_LOG to an appropriate diagnostic level for a limited troubleshooting run and disable it after collecting a redacted log in a protected location.
  3. Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.
  4. Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration.

Answer & Explanations

Correct answer: C

A.

When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure. This addresses “Use state mv and state rm only with an explicit migration plan”, where the governing principle is: State operations alter the resource-to-remote-object mapping, so removing an address from state makes Terraform forget ownership while the cloud object remains. The stated case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

B.

Set TF_LOG to an appropriate diagnostic level for a limited troubleshooting run and disable it after collecting a redacted log in a protected location. This addresses “Enable diagnostic Terraform logging only while investigating faults”, where the governing principle is: Terraform emits more detailed internal/provider interactions when debugging is enabled; verbose logs can expose environment information or sensitive values. The stated case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

C.

Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth. Verify the result with this test: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

D.

Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. This addresses “Use declarative import blocks as reviewed adoption instructions”, where the governing principle is: Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command. The stated case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

Question 622

A retail IT team needs to identify which resources a specific Terraform workspace actually manages before proposing cleanup. The infrastructure engineer proposes this change: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Which mechanism explains why it works?

  1. State operations alter the resource-to-remote-object mapping, so removing an address from state makes Terraform forget ownership while the cloud object remains.
  2. Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command.
  3. Terraform emits more detailed internal/provider interactions when debugging is enabled; verbose logs can expose environment information or sensitive values.
  4. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

Answer & Explanations

Correct answer: D

A.

State operations alter the resource-to-remote-object mapping, so removing an address from state makes Terraform forget ownership while the cloud object remains. That explains “Use state mv and state rm only with an explicit migration plan”, not the mechanism behind the described change. The relevant principle is: These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

B.

Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command. That explains “Use declarative import blocks as reviewed adoption instructions”, not the mechanism behind the described change. The relevant principle is: These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

C.

Terraform emits more detailed internal/provider interactions when debugging is enabled; verbose logs can expose environment information or sensitive values. That explains “Enable diagnostic Terraform logging only while investigating faults”, not the mechanism behind the described change. The relevant principle is: These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

D.

These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth. The corresponding implementation is: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

Question 623

A retail IT team needs to identify which resources a specific Terraform workspace actually manages before proposing cleanup. After implementing this change—Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.—which test most directly validates its intended outcome?

  1. Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object.
  2. After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.
  3. On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes.
  4. Reproduce a harmless provider initialization failure with temporary logging, confirm the relevant error is recorded and clear the log level afterward.

Answer & Explanations

Correct answer: B

A.

Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object. That would help test “Use declarative import blocks as reviewed adoption instructions”, not the outcome required in this scenario. The relevant acceptance check is: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

B.

After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object. This check is decisive because these commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

C.

On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes. That would help test “Use state mv and state rm only with an explicit migration plan”, not the outcome required in this scenario. The relevant acceptance check is: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

D.

Reproduce a harmless provider initialization failure with temporary logging, confirm the relevant error is recorded and clear the log level afterward. That would help test “Enable diagnostic Terraform logging only while investigating faults”, not the outcome required in this scenario. The relevant acceptance check is: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

Question 624

A retail IT team needs to identify which resources a specific Terraform workspace actually manages before proposing cleanup. Which proposed shortcut most directly risks incomplete infrastructure inventory and incorrect operational decisions and should therefore be rejected?

  1. Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.
  2. Run terraform state rm on a production database and assume the provider will delete the live database along with its state entry.
  3. Run Terraform TRACE logging permanently in public CI logs and assume debug output can never include sensitive configuration or API details.
  4. Assume placing an import block alone creates a complete and correct Terraform resource configuration for every provider argument automatically.

Answer & Explanations

Correct answer: A

A.

Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed. The foreseeable failure is incomplete infrastructure inventory and incorrect operational decisions. The safer response is: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

B.

Run terraform state rm on a production database and assume the provider will delete the live database along with its state entry. That shortcut risks orphaned unmanaged resources and dangerous future duplicate creation plans. Here the specific shortcut is: Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.

C.

Run Terraform TRACE logging permanently in public CI logs and assume debug output can never include sensitive configuration or API details. That shortcut risks secrets exposure and noisy operational logs from uncontrolled debug settings. Here the specific shortcut is: Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.

D.

Assume placing an import block alone creates a complete and correct Terraform resource configuration for every provider argument automatically. That shortcut risks unsafe resource adoption or unexpected changes due to missing configuration. Here the specific shortcut is: Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.

Question 625

A retail IT team needs to identify which resources a specific Terraform workspace actually manages before proposing cleanup. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Verify: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.
  2. Implement: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Verify: On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes.
  3. Implement: When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure. Verify: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.
  4. Implement: Set TF_LOG to an appropriate diagnostic level for a limited troubleshooting run and disable it after collecting a redacted log in a protected location. Verify: Reproduce a harmless provider initialization failure with temporary logging, confirm the relevant error is recorded and clear the log level afterward.

Answer & Explanations

Correct answer: A

A.

Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Confirm it through this test: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

B.

The action is applicable: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. But its proposed test—On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes.—addresses “Use state mv and state rm only with an explicit migration plan”. This requirement is confirmed instead by: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

C.

The test would be relevant: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object. But the offered implementation—When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure.—addresses “Use state mv and state rm only with an explicit migration plan”. The action needed here is: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

D.

This action/test pair addresses “Enable diagnostic Terraform logging only while investigating faults”. Set TF_LOG to an appropriate diagnostic level for a limited troubleshooting run and disable it after collecting a redacted log in a protected location. Reproduce a harmless provider initialization failure with temporary logging, confirm the relevant error is recorded and clear the log level afterward. The case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

Question 626

A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration.
  2. When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure.
  3. Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.
  4. Create an appropriate resource block for a preexisting authorized object and run terraform import with its correct resource address and provider-specific identifier.

Answer & Explanations

Correct answer: C

A.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. This addresses “Use declarative import blocks as reviewed adoption instructions”, where the governing principle is: Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command. The stated case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

B.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure. This addresses “Use state mv and state rm only with an explicit migration plan”, where the governing principle is: State operations alter the resource-to-remote-object mapping, so removing an address from state makes Terraform forget ownership while the cloud object remains. The stated case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

C.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth. Verify the result with this test: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

D.

Create an appropriate resource block for a preexisting authorized object and run terraform import with its correct resource address and provider-specific identifier. This addresses “Import an existing managed object using the Terraform CLI”, where the governing principle is: Import associates an existing remote object with Terraform state; it does not automatically guarantee complete configuration, matching all provider attributes or safe ownership. The stated case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

Question 627

A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. The infrastructure engineer proposes this change: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Which mechanism explains why it works?

  1. State operations alter the resource-to-remote-object mapping, so removing an address from state makes Terraform forget ownership while the cloud object remains.
  2. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.
  3. Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command.
  4. Import associates an existing remote object with Terraform state; it does not automatically guarantee complete configuration, matching all provider attributes or safe ownership.

Answer & Explanations

Correct answer: B

A.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. State operations alter the resource-to-remote-object mapping, so removing an address from state makes Terraform forget ownership while the cloud object remains. That explains “Use state mv and state rm only with an explicit migration plan”, not the mechanism behind the described change. The relevant principle is: These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

B.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth. The corresponding implementation is: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

C.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Terraform import blocks enable import to participate in the normal plan and apply workflow, improving reviewability over an untracked one-off command. That explains “Use declarative import blocks as reviewed adoption instructions”, not the mechanism behind the described change. The relevant principle is: These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

D.

Import associates an existing remote object with Terraform state; it does not automatically guarantee complete configuration, matching all provider attributes or safe ownership. That explains “Import an existing managed object using the Terraform CLI”, not the mechanism behind the described change. The relevant principle is: These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

Question 628

A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. After implementing this change—Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.—which test most directly validates its intended outcome?

  1. Import a disposable pre-created object, inspect state and run plan to ensure the declared HCL does not propose unintended modifications.
  2. Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object.
  3. On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes.
  4. After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

Answer & Explanations

Correct answer: D

A.

Import a disposable pre-created object, inspect state and run plan to ensure the declared HCL does not propose unintended modifications. That would help test “Import an existing managed object using the Terraform CLI”, not the outcome required in this scenario. The relevant acceptance check is: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

B.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object. That would help test “Use declarative import blocks as reviewed adoption instructions”, not the outcome required in this scenario. The relevant acceptance check is: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

C.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes. That would help test “Use state mv and state rm only with an explicit migration plan”, not the outcome required in this scenario. The relevant acceptance check is: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

D.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object. This check is decisive because these commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

Question 629

A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Which proposed shortcut most directly risks incomplete infrastructure inventory and incorrect operational decisions and should therefore be rejected?

  1. Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.
  2. Assume placing an import block alone creates a complete and correct Terraform resource configuration for every provider argument automatically.
  3. Run terraform state rm on a production database and assume the provider will delete the live database along with its state entry.
  4. Run terraform apply against a newly declared resource that already exists and assume Terraform automatically claims it without import.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed. The foreseeable failure is incomplete infrastructure inventory and incorrect operational decisions. The safer response is: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

B.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Assume placing an import block alone creates a complete and correct Terraform resource configuration for every provider argument automatically. That shortcut risks unsafe resource adoption or unexpected changes due to missing configuration. Here the specific shortcut is: Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.

C.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Run terraform state rm on a production database and assume the provider will delete the live database along with its state entry. That shortcut risks orphaned unmanaged resources and dangerous future duplicate creation plans. Here the specific shortcut is: Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.

D.

Run terraform apply against a newly declared resource that already exists and assume Terraform automatically claims it without import. That shortcut risks duplicate creation errors or unwanted replacement when adopting existing infrastructure. Here the specific shortcut is: Treat terraform state list as an authoritative inventory of every resource in the entire cloud account including objects Terraform has never managed.

Question 630

A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. Verify: Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object.
  2. Implement: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Verify: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.
  3. Implement: When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure. Verify: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.
  4. Implement: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Verify: On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes.

Answer & Explanations

Correct answer: B

A.

This action/test pair addresses “Use declarative import blocks as reviewed adoption instructions”. Declare an import block mapping an existing object identifier to the intended resource address and review the plan along with its matching resource configuration. Write a disposable import block and matching resource block, inspect the planned adoption and confirm post-import no-change state for the object. The case instead calls for: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

B.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. Confirm it through this test: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object. These commands report local or backend state view, not a guaranteed complete scan of all cloud resources or automatically refreshed remote truth.

C.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. The test would be relevant: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object. But the offered implementation—When changing state bindings, use supported terraform state mv or state rm cautiously with backups and verify a full plan afterward; remember state rm does not delete remote infrastructure.—addresses “Use state mv and state rm only with an explicit migration plan”. The action needed here is: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes.

D.

The question is set in this situation: A cloud support engineer wants to inspect the recorded ID for one module resource without launching a destructive operation. The action is applicable: Run terraform state list to discover managed instance addresses and terraform state show on the selected address to inspect Terraform's recorded attributes. But its proposed test—On a disposable object, inspect state, remove its binding under supervision and confirm the remote object survives while the next plan changes.—addresses “Use state mv and state rm only with an explicit migration plan”. This requirement is confirmed instead by: After applying disposable resources, list addresses, inspect a selected record and compare its ID to the actual test cloud object.

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