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 44

Question 430

An acceptance reviewer at Crescent Infrastructure Team must validate the fix for: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. Which observation best confirms that the proposed correction worked?

  1. A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.
  2. The plan highlights the specific replacement and allows reviewers to block it.
  3. After apply, terraform output returns the expected endpoint from the managed resource.
  4. The module's resources resolve the caller-approved account and no unexpected credentials are used.

Explanation

Correct Answer

A:

A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name. This directly verifies the corrective action: Review name uniqueness and lifecycle tradeoffs, choosing a safe migration or downtime approach instead of assuming create_before_destroy can always work. The measured result specifically addresses the failure at Crescent Infrastructure Team: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints.

Incorrect Answers

B:

The plan highlights the specific replacement and allows reviewers to block it. This evidence would validate a DIFFERENT correction: Run terraform plan and examine create/update/delete or replace actions, not just the source diff. That different correction addresses: A proposed firewall change contains an unintended replacement, but the team reviews only changed HCL lines. It does not establish that the Crescent Infrastructure Team issue has been corrected: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The relevant measured outcome is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

C:

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 Crescent Infrastructure Team issue has been corrected: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The relevant measured outcome is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

D:

The module's resources resolve the caller-approved account and no unexpected credentials are used. This evidence would validate a DIFFERENT correction: Pass provider configurations from the caller and avoid nested provider configuration in reusable child modules where possible. That different correction addresses: An application module quietly configures an independent provider account, conflicting with the root's deployment credentials. It does not establish that the Crescent Infrastructure Team issue has been corrected: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The relevant measured outcome is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

Question 431

At Cedar Bridge Technologies, the Terraform review finds this specific problem: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. Which proposed fix addresses the reported root cause?

  1. Distinguish syntactic/schema validation from plan and apply, and run the appropriate workflow stage.
  2. Review name uniqueness and lifecycle tradeoffs, choosing a safe migration or downtime approach instead of assuming create_before_destroy can always work.
  3. Use the configured VCS-driven workflow or deliberately choose a supported CLI/API upload execution mode.
  4. Declare a typed input variable for the CIDR and supply environment-specific values to the module.

Explanation

Correct Answer

B:

Review name uniqueness and lifecycle tradeoffs, choosing a safe migration or downtime approach instead of assuming create_before_destroy can always work. This is targeted to the observed Terraform issue: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. At Cedar Bridge Technologies, the acceptance criterion is not merely a valid plan; the team should verify: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

Incorrect Answers

A:

Distinguish syntactic/schema validation from plan and apply, and run the appropriate workflow stage. This would be suitable for a DIFFERENT Terraform problem: An engineer believes terraform validate also creates the declared infrastructure and announces deployment after a successful validation. It does not directly resolve the Cedar Bridge Technologies failure: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The required acceptance evidence instead is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

C:

Use the configured VCS-driven workflow or deliberately choose a supported CLI/API upload execution mode. This would be suitable for a DIFFERENT Terraform problem: A workspace is connected to a Git repository but the team expects it to run changes from arbitrary uncommitted local files. It does not directly resolve the Cedar Bridge Technologies failure: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The required acceptance evidence instead is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

D:

Declare a typed input variable for the CIDR and supply environment-specific values to the module. This would be suitable for a DIFFERENT Terraform problem: A regional network module hardcodes its CIDR block and cannot be reused in test and production. It does not directly resolve the Cedar Bridge Technologies failure: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The required acceptance evidence instead is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

Question 432

After corrective work at Cedar Bridge Technologies, a reviewer requests measurable proof for: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. What result would demonstrate that the identified problem is actually resolved?

  1. Two plans use the same module code but show the appropriate CIDR for each environment.
  2. Validation reports configuration consistency while the actual resource creation is confirmed only after apply.
  3. A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.
  4. A run records the intended committed configuration version rather than an untracked workstation edit.

Explanation

Correct Answer

C:

A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name. This directly verifies the corrective action: Review name uniqueness and lifecycle tradeoffs, choosing a safe migration or downtime approach instead of assuming create_before_destroy can always work. The measured result specifically addresses the failure at Cedar Bridge Technologies: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints.

Incorrect Answers

A:

Two plans use the same module code but show the appropriate CIDR for each environment. This evidence would validate a DIFFERENT correction: Declare a typed input variable for the CIDR and supply environment-specific values to the module. That different correction addresses: A regional network module hardcodes its CIDR block and cannot be reused in test and production. It does not establish that the Cedar Bridge Technologies issue has been corrected: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The relevant measured outcome is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

B:

Validation reports configuration consistency while the actual resource creation is confirmed only after apply. This evidence would validate a DIFFERENT correction: Distinguish syntactic/schema validation from plan and apply, and run the appropriate workflow stage. That different correction addresses: An engineer believes terraform validate also creates the declared infrastructure and announces deployment after a successful validation. It does not establish that the Cedar Bridge Technologies issue has been corrected: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The relevant measured outcome is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

D:

A run records the intended committed configuration version rather than an untracked workstation edit. This evidence would validate a DIFFERENT correction: Use the configured VCS-driven workflow or deliberately choose a supported CLI/API upload execution mode. That different correction addresses: A workspace is connected to a Git repository but the team expects it to run changes from arbitrary uncommitted local files. It does not establish that the Cedar Bridge Technologies issue has been corrected: A service's immutable globally unique name prevents simultaneous duplicate instances, but engineers enable create_before_destroy without checking constraints. The relevant measured outcome is: A controlled replacement plan honors actual uniqueness constraints without failing on an unavoidable duplicate name.

Question 433

At Northgate IT Platforms, the Terraform review finds this specific problem: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. What is the most appropriate corrective action for this Terraform scenario?

  1. Prefer implicit dependencies through real references and reserve depends_on for hidden behavior dependencies.
  2. Use correctly configured Terraform CLI workspaces or distinct state paths with documented environment isolation.
  3. Treat sensitive=true as output redaction, use supported ephemeral/write-only flows or external secret handling, and secure state access.
  4. Describe the intended network and related resources as Terraform configuration managed through a reviewed version-control workflow.

Explanation

Correct Answer

A:

Prefer implicit dependencies through real references and reserve depends_on for hidden behavior dependencies. This is targeted to the observed Terraform issue: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. At Northgate IT Platforms, the acceptance criterion is not merely a valid plan; the team should verify: The graph preserves required ordering while unrelated resources can still plan independently.

Incorrect Answers

B:

Use correctly configured Terraform CLI workspaces or distinct state paths with documented environment isolation. This would be suitable for a DIFFERENT Terraform problem: A team wants separate isolated states for training and production in a local backend but runs both with the same unseparated state file. It does not directly resolve the Northgate IT Platforms failure: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The required acceptance evidence instead is: The graph preserves required ordering while unrelated resources can still plan independently.

C:

Treat sensitive=true as output redaction, use supported ephemeral/write-only flows or external secret handling, and secure state access. This would be suitable for a DIFFERENT Terraform problem: A team marks a database password variable sensitive=true and assumes its value can never appear in the Terraform state file. It does not directly resolve the Northgate IT Platforms failure: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The required acceptance evidence instead is: The graph preserves required ordering while unrelated resources can still plan independently.

D:

Describe the intended network and related resources as Terraform configuration managed through a reviewed version-control workflow. This would be suitable for a DIFFERENT Terraform problem: A small platform team provisions virtual networks through undocumented web-console clicks, so nobody can explain what the next environment should contain. It does not directly resolve the Northgate IT Platforms failure: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The required acceptance evidence instead is: The graph preserves required ordering while unrelated resources can still plan independently.

Question 434

After corrective work at Northgate IT Platforms, a reviewer requests measurable proof for: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. Which controlled check would validate the remediation?

  1. A clean environment is planned from the checked-in configuration and produces the expected inventory without reconstructing console click history.
  2. The graph preserves required ordering while unrelated resources can still plan independently.
  3. State inspection and a controlled credential-rotation design confirm that the secret is not recorded through the chosen write-only path.
  4. Each environment's state list contains only its own intended resource addresses.

Explanation

Correct Answer

B:

The graph preserves required ordering while unrelated resources can still plan independently. This directly verifies the corrective action: Prefer implicit dependencies through real references and reserve depends_on for hidden behavior dependencies. The measured result specifically addresses the failure at Northgate IT Platforms: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering.

Incorrect Answers

A:

A clean environment is planned from the checked-in configuration and produces the expected inventory without reconstructing console click history. This evidence would validate a DIFFERENT correction: Describe the intended network and related resources as Terraform configuration managed through a reviewed version-control workflow. That different correction addresses: A small platform team provisions virtual networks through undocumented web-console clicks, so nobody can explain what the next environment should contain. It does not establish that the Northgate IT Platforms issue has been corrected: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The relevant measured outcome is: The graph preserves required ordering while unrelated resources can still plan independently.

C:

State inspection and a controlled credential-rotation design confirm that the secret is not recorded through the chosen write-only path. This evidence would validate a DIFFERENT correction: Treat sensitive=true as output redaction, use supported ephemeral/write-only flows or external secret handling, and secure state access. That different correction addresses: A team marks a database password variable sensitive=true and assumes its value can never appear in the Terraform state file. It does not establish that the Northgate IT Platforms issue has been corrected: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The relevant measured outcome is: The graph preserves required ordering while unrelated resources can still plan independently.

D:

Each environment's state list contains only its own intended resource addresses. This evidence would validate a DIFFERENT correction: Use correctly configured Terraform CLI workspaces or distinct state paths with documented environment isolation. That different correction addresses: A team wants separate isolated states for training and production in a local backend but runs both with the same unseparated state file. It does not establish that the Northgate IT Platforms issue has been corrected: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The relevant measured outcome is: The graph preserves required ordering while unrelated resources can still plan independently.

Question 435

The infrastructure engineers at Orchard Enterprise Platforms document the following failure during a change review: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. Which action would best restore the intended infrastructure-as-code workflow?

  1. Use terraform state show with the exact resource address and handle displayed sensitive information appropriately.
  2. Use an authorized terraform destroy workflow for resources still tracked in state, reviewing the destruction plan first.
  3. Prefer implicit dependencies through real references and reserve depends_on for hidden behavior dependencies.
  4. Use a set(string) type for unique unordered values when the provider argument expects set-like semantics.

Explanation

Correct Answer

C:

Prefer implicit dependencies through real references and reserve depends_on for hidden behavior dependencies. This is targeted to the observed Terraform issue: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. At Orchard Enterprise Platforms, the acceptance criterion is not merely a valid plan; the team should verify: The graph preserves required ordering while unrelated resources can still plan independently.

Incorrect Answers

A:

Use terraform state show with the exact resource address and handle displayed sensitive information appropriately. This would be suitable for a DIFFERENT Terraform problem: An engineer wants to inspect attributes recorded for a specific managed resource without editing state JSON directly. It does not directly resolve the Orchard Enterprise Platforms failure: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The required acceptance evidence instead is: The graph preserves required ordering while unrelated resources can still plan independently.

B:

Use an authorized terraform destroy workflow for resources still tracked in state, reviewing the destruction plan first. This would be suitable for a DIFFERENT Terraform problem: A sandbox project is scheduled for decommissioning, but an engineer deletes its HCL files and assumes the remote resources disappear. It does not directly resolve the Orchard Enterprise Platforms failure: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The required acceptance evidence instead is: The graph preserves required ordering while unrelated resources can still plan independently.

D:

Use a set(string) type for unique unordered values when the provider argument expects set-like semantics. This would be suitable for a DIFFERENT Terraform problem: An API requires a set of unique IP ranges, but a configuration passes a list with duplicates and relies on position-based semantics. It does not directly resolve the Orchard Enterprise Platforms failure: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The required acceptance evidence instead is: The graph preserves required ordering while unrelated resources can still plan independently.

Question 436

The reliability team at Orchard Enterprise Platforms is closing an incident described as follows: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. Which observation best confirms that the proposed correction worked?

  1. Duplicate entries collapse and the resulting plan uses a unique collection of permitted ranges.
  2. The approved plan identifies managed objects for removal and a post-run check confirms they are deleted.
  3. The returned object attributes correspond to the intended address and are reviewed securely.
  4. The graph preserves required ordering while unrelated resources can still plan independently.

Explanation

Correct Answer

D:

The graph preserves required ordering while unrelated resources can still plan independently. This directly verifies the corrective action: Prefer implicit dependencies through real references and reserve depends_on for hidden behavior dependencies. The measured result specifically addresses the failure at Orchard Enterprise Platforms: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering.

Incorrect Answers

A:

Duplicate entries collapse and the resulting plan uses a unique collection of permitted ranges. This evidence would validate a DIFFERENT correction: Use a set(string) type for unique unordered values when the provider argument expects set-like semantics. That different correction addresses: An API requires a set of unique IP ranges, but a configuration passes a list with duplicates and relies on position-based semantics. It does not establish that the Orchard Enterprise Platforms issue has been corrected: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The relevant measured outcome is: The graph preserves required ordering while unrelated resources can still plan independently.

B:

The approved plan identifies managed objects for removal and a post-run check confirms they are deleted. This evidence would validate a DIFFERENT correction: Use an authorized terraform destroy workflow for resources still tracked in state, reviewing the destruction plan first. That different correction addresses: A sandbox project is scheduled for decommissioning, but an engineer deletes its HCL files and assumes the remote resources disappear. It does not establish that the Orchard Enterprise Platforms issue has been corrected: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The relevant measured outcome is: The graph preserves required ordering while unrelated resources can still plan independently.

C:

The returned object attributes correspond to the intended address and are reviewed securely. This evidence would validate a DIFFERENT correction: Use terraform state show with the exact resource address and handle displayed sensitive information appropriately. That different correction addresses: An engineer wants to inspect attributes recorded for a specific managed resource without editing state JSON directly. It does not establish that the Orchard Enterprise Platforms issue has been corrected: A dependency is already expressed by a resource attribute but a developer adds depends_on to every unrelated module, producing excessive ordering. The relevant measured outcome is: The graph preserves required ordering while unrelated resources can still plan independently.

Question 437

The infrastructure engineers at Summit Platform Engineering document the following failure during a change review: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. How should the Terraform engineer correct this specific failure?

  1. Build a reusable child module for the shared networking pattern and invoke it with documented application inputs.
  2. Apply an appropriate prevent_destroy lifecycle rule and complementary access/governance controls for the protected resource.
  3. Add an explicit child output block and reference it through the module namespace from the root.
  4. Handle the documented detailed exit codes: zero for no changes, two for changes, and one for errors.

Explanation

Correct Answer

B:

Apply an appropriate prevent_destroy lifecycle rule and complementary access/governance controls for the protected resource. This is targeted to the observed Terraform issue: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. At Summit Platform Engineering, the acceptance criterion is not merely a valid plan; the team should verify: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

Incorrect Answers

A:

Build a reusable child module for the shared networking pattern and invoke it with documented application inputs. This would be suitable for a DIFFERENT Terraform problem: A service team duplicates a networking subnet and routing configuration across five applications. It does not directly resolve the Summit Platform Engineering failure: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The required acceptance evidence instead is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

C:

Add an explicit child output block and reference it through the module namespace from the root. This would be suitable for a DIFFERENT Terraform problem: A deployment consumes an output from a child module but forgets to declare the output in the module itself. It does not directly resolve the Summit Platform Engineering failure: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The required acceptance evidence instead is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

D:

Handle the documented detailed exit codes: zero for no changes, two for changes, and one for errors. This would be suitable for a DIFFERENT Terraform problem: A CI job invokes terraform plan -detailed-exitcode but treats a change-detected exit status as a tool failure. It does not directly resolve the Summit Platform Engineering failure: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The required acceptance evidence instead is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

Question 438

The reliability team at Summit Platform Engineering is closing an incident described as follows: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. Which verification outcome is the strongest evidence of the required correction?

  1. Validation resolves the child output and the value appears after successful creation.
  2. The CI decision distinguishes a legitimate diff from a genuine planning error without skipping review.
  3. A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.
  4. The applications use the same reviewed module interface while each plan creates its own correctly parameterized resources.

Explanation

Correct Answer

C:

A proposed deletion is rejected by Terraform while the rule remains in the resource configuration. This directly verifies the corrective action: Apply an appropriate prevent_destroy lifecycle rule and complementary access/governance controls for the protected resource. The measured result specifically addresses the failure at Summit Platform Engineering: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy.

Incorrect Answers

A:

Validation resolves the child output and the value appears after successful creation. This evidence would validate a DIFFERENT correction: Add an explicit child output block and reference it through the module namespace from the root. That different correction addresses: A deployment consumes an output from a child module but forgets to declare the output in the module itself. It does not establish that the Summit Platform Engineering issue has been corrected: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The relevant measured outcome is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

B:

The CI decision distinguishes a legitimate diff from a genuine planning error without skipping review. This evidence would validate a DIFFERENT correction: Handle the documented detailed exit codes: zero for no changes, two for changes, and one for errors. That different correction addresses: A CI job invokes terraform plan -detailed-exitcode but treats a change-detected exit status as a tool failure. It does not establish that the Summit Platform Engineering issue has been corrected: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The relevant measured outcome is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

D:

The applications use the same reviewed module interface while each plan creates its own correctly parameterized resources. This evidence would validate a DIFFERENT correction: Build a reusable child module for the shared networking pattern and invoke it with documented application inputs. That different correction addresses: A service team duplicates a networking subnet and routing configuration across five applications. It does not establish that the Summit Platform Engineering issue has been corrected: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The relevant measured outcome is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

Question 439

Redwood Application Group is preparing a controlled Terraform update after identifying this fault: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. What is the most appropriate corrective action for this Terraform scenario?

  1. Use fmt for style, init for dependencies, and validate for configuration checks as separate steps.
  2. Update the provider-defined write-only version marker according to its documented rotation mechanism.
  3. Use a state mv or moved block for address refactoring when the same remote object should remain managed.
  4. Apply an appropriate prevent_destroy lifecycle rule and complementary access/governance controls for the protected resource.

Explanation

Correct Answer

D:

Apply an appropriate prevent_destroy lifecycle rule and complementary access/governance controls for the protected resource. This is targeted to the observed Terraform issue: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. At Redwood Application Group, the acceptance criterion is not merely a valid plan; the team should verify: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

Incorrect Answers

A:

Use fmt for style, init for dependencies, and validate for configuration checks as separate steps. This would be suitable for a DIFFERENT Terraform problem: An engineer assumes terraform fmt downloads providers and validates all provider resource attributes. It does not directly resolve the Redwood Application Group failure: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The required acceptance evidence instead is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

B:

Update the provider-defined write-only version marker according to its documented rotation mechanism. This would be suitable for a DIFFERENT Terraform problem: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. It does not directly resolve the Redwood Application Group failure: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The required acceptance evidence instead is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

C:

Use a state mv or moved block for address refactoring when the same remote object should remain managed. This would be suitable for a DIFFERENT Terraform problem: A resource is renamed in configuration but a team uses state rm, then wonders why Terraform plans to create a duplicate object. It does not directly resolve the Redwood Application Group failure: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The required acceptance evidence instead is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

Question 440

Redwood Application Group requires independent evidence before signing off this Terraform correction: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. Which controlled check would validate the remediation?

  1. A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.
  2. The plan detects the version change and the provider applies the new secret without persisting the secret itself.
  3. The state mapping moves to the new address and the plan retains the existing remote identity.
  4. A formatted but invalid argument still fails terraform validate, demonstrating the separation.

Explanation

Correct Answer

A:

A proposed deletion is rejected by Terraform while the rule remains in the resource configuration. This directly verifies the corrective action: Apply an appropriate prevent_destroy lifecycle rule and complementary access/governance controls for the protected resource. The measured result specifically addresses the failure at Redwood Application Group: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy.

Incorrect Answers

B:

The plan detects the version change and the provider applies the new secret without persisting the secret itself. This evidence would validate a DIFFERENT correction: Update the provider-defined write-only version marker according to its documented rotation mechanism. That different correction addresses: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. It does not establish that the Redwood Application Group issue has been corrected: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The relevant measured outcome is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

C:

The state mapping moves to the new address and the plan retains the existing remote identity. This evidence would validate a DIFFERENT correction: Use a state mv or moved block for address refactoring when the same remote object should remain managed. That different correction addresses: A resource is renamed in configuration but a team uses state rm, then wonders why Terraform plans to create a duplicate object. It does not establish that the Redwood Application Group issue has been corrected: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The relevant measured outcome is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.

D:

A formatted but invalid argument still fails terraform validate, demonstrating the separation. This evidence would validate a DIFFERENT correction: Use fmt for style, init for dependencies, and validate for configuration checks as separate steps. That different correction addresses: An engineer assumes terraform fmt downloads providers and validates all provider resource attributes. It does not establish that the Redwood Application Group issue has been corrected: A production database must not be destroyed accidentally and an operator assumes a standard plan approval alone prevents every destroy. The relevant measured outcome is: A proposed deletion is rejected by Terraform while the rule remains in the resource configuration.