HashiCorp Terraform Associate Practice Test 45
Question 440
A provider requires a monitoring resource to wait for a remote API registration call, but no output attribute links the two actions and ordering is incorrect. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The module outputs a consistent address list matching selected instances.
- The configuration evaluates map entries only inside valid iteration contexts.
- Terraform plans creation of the intended network rather than failing a lookup.
- The monitor is created after its required registration while unrelated actions remain parallel.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: The monitor is created after its required registration while unrelated actions remain parallel. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Document the hidden dependency and test a clean deployment.
Incorrect Answers
A:“The module outputs a consistent address list matching selected instances” would address a different Terraform configuration concern; the source instead describes A provider requires a monitoring resource to wait for a remote API registration call, but no output attribute links the two actions and ordering is incorrect. The appropriate design is to add a narrow explicit depends_on dependency only where an actual hidden operational dependency exists. Confirm whether the monitor is created after its required registration while unrelated actions remain parallel.
B:“The configuration evaluates map entries only inside valid iteration contexts” would address a different Terraform configuration concern; the source instead describes A provider requires a monitoring resource to wait for a remote API registration call, but no output attribute links the two actions and ordering is incorrect. The appropriate design is to add a narrow explicit depends_on dependency only where an actual hidden operational dependency exists. Confirm whether the monitor is created after its required registration while unrelated actions remain parallel.
C:“Terraform plans creation of the intended network rather than failing a lookup” would address a different Terraform configuration concern; the source instead describes A provider requires a monitoring resource to wait for a remote API registration call, but no output attribute links the two actions and ordering is incorrect. The appropriate design is to add a narrow explicit depends_on dependency only where an actual hidden operational dependency exists. Confirm whether the monitor is created after its required registration while unrelated actions remain parallel.
Question 441
A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Keep each.key and each.value scoped to blocks with for_each or pass derived values explicitly.
- Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely.
- Use a dynamic block only when the provider resource schema accepts that repeated nested block type.
- Use a resource or data-source precondition where appropriate to enforce the required operational invariant.
Explanation
Correct Answer
B:The proposed intervention addresses the reported Terraform engineering failure: A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. It applies the design choice Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Review the primary diagnostic: Inspect provider uniqueness constraints and why replacement is required. The expected outcome is: The migration preserves availability without impossible duplicate naming. The rollout safeguard is: Test name strategy and dependent references before apply.
Incorrect Answers
A:“Keep each.key and each.value scoped to blocks with for_each or pass derived values explicitly” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
C:“Use a dynamic block only when the provider resource schema accepts that repeated nested block type” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
D:“Use a resource or data-source precondition where appropriate to enforce the required operational invariant” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
Question 442
A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Inspect the endpoint expression and available evaluation stage.
- Review which resource references already produce implicit graph edges.
- Inspect name constructions across resource blocks.
- Inspect provider uniqueness constraints and why replacement is required.
- Review planned old and new object lifecycles under create_before_destroy.
Explanation
Correct Answers
D:This is directly relevant evidence for the reported behavior: Inspect provider uniqueness constraints and why replacement is required. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. The expected confirmation is The migration preserves availability without impossible duplicate naming.
E:This is directly relevant evidence for the reported behavior: Review planned old and new object lifecycles under create_before_destroy. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. The expected confirmation is The migration preserves availability without impossible duplicate naming.
Incorrect Answers
A:“Inspect the endpoint expression and available evaluation stage” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
B:“Review which resource references already produce implicit graph edges” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
C:“Inspect name constructions across resource blocks” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
Question 443
A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Undeclared cross-module assumptions create brittle integrations and expose internals.
- Passing secret input through ordinary resource arguments can persist sensitive data.
- A lifecycle rule is not a comprehensive cloud deletion protection.
- Blind create-before-destroy can fail when the remote API enforces uniqueness.
Explanation
Correct Answer
D:The reported condition creates the specific potential exposure: Blind create-before-destroy can fail when the remote API enforces uniqueness. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect provider uniqueness constraints and why replacement is required. Second diagnostic: Review planned old and new object lifecycles under create_before_destroy.
Incorrect Answers
A:“Undeclared cross-module assumptions create brittle integrations and expose internals” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
B:“Passing secret input through ordinary resource arguments can persist sensitive data” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
C:“A lifecycle rule is not a comprehensive cloud deletion protection” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
Question 444
A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely.
- Document defaults and validate supported timeout ranges.
- Use for_each keyed by stable subnet identifiers rather than a shifting positional list for independently named objects.
- Keep mandatory security invariants in actual enforceable conditions.
- Test name strategy and dependent references before apply.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Together the corrective action and its implementation safeguard need to address the recorded condition: A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. Acceptance requires The migration preserves availability without impossible duplicate naming.
E:This is one of the two necessary decisions for a safe design: Test name strategy and dependent references before apply. Together the corrective action and its implementation safeguard need to address the recorded condition: A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. Acceptance requires The migration preserves availability without impossible duplicate naming.
Incorrect Answers
B:“Document defaults and validate supported timeout ranges” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
C:“Use for_each keyed by stable subnet identifiers rather than a shifting positional list for independently named objects” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
D:“Keep mandatory security invariants in actual enforceable conditions” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
Question 445
A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The resource exists once with the correct optional logging configuration.
- The child receives the intended environment value independent of naming coincidence.
- The migration preserves availability without impossible duplicate naming.
- The monitor is created after its required registration while unrelated actions remain parallel.
Explanation
Correct Answer
C:This is the appropriate measurable post-change acceptance criterion: The migration preserves availability without impossible duplicate naming. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Test name strategy and dependent references before apply.
Incorrect Answers
A:“The resource exists once with the correct optional logging configuration” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
B:“The child receives the intended environment value independent of naming coincidence” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
D:“The monitor is created after its required registration while unrelated actions remain parallel” would address a different Terraform configuration concern; the source instead describes A production database has a mandatory unique name, and an engineer enables create_before_destroy for an in-place replacement without accounting for name conflicts. The appropriate design is to evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely. Confirm whether the migration preserves availability without impossible duplicate naming.
Question 446
A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Declare the value ephemeral and consume it only in permitted contexts, rather than persisting it in an ordinary output or resource attribute.
- Understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration.
- Use the provider-supported write-only argument with an appropriate version/change trigger and an ephemeral secret source.
- Use a suitable postcondition on the relevant managed value to verify the resulting attribute.
Explanation
Correct Answer
B:The proposed intervention addresses the reported Terraform engineering failure: A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. It applies the design choice Understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Review the primary diagnostic: Inspect the lifecycle block and any planned destroy operation. The expected outcome is: Terraform blocks unapproved destruction while separate platform controls guard the live object. The rollout safeguard is: Use provider safeguards and backups in addition to plan checks.
Incorrect Answers
A:“Declare the value ephemeral and consume it only in permitted contexts, rather than persisting it in an ordinary output or resource attribute” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
C:“Use the provider-supported write-only argument with an appropriate version/change trigger and an ephemeral secret source” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
D:“Use a suitable postcondition on the relevant managed value to verify the resulting attribute” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
Question 447
A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Inspect the input value type and authorized naming rules.
- Review out-of-band deletion protections and provider-level access controls.
- Inspect the lifecycle block and any planned destroy operation.
- Inspect external health signal availability and evaluation timing.
- Inspect the module's internal resource address and public outputs.
Explanation
Correct Answers
B:This is directly relevant evidence for the reported behavior: Review out-of-band deletion protections and provider-level access controls. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. The expected confirmation is Terraform blocks unapproved destruction while separate platform controls guard the live object.
C:This is directly relevant evidence for the reported behavior: Inspect the lifecycle block and any planned destroy operation. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. The expected confirmation is Terraform blocks unapproved destruction while separate platform controls guard the live object.
Incorrect Answers
A:“Inspect the input value type and authorized naming rules” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
D:“Inspect external health signal availability and evaluation timing” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
E:“Inspect the module's internal resource address and public outputs” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
Question 448
A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- A lifecycle rule is not a comprehensive cloud deletion protection.
- Implicit ordering assumptions can create unstable downstream configuration.
- Unnecessary broad depends_on edges can slow plans and create misleading coupling.
- Catching every error can conceal configuration mistakes.
Explanation
Correct Answer
A:The reported condition creates the specific potential exposure: A lifecycle rule is not a comprehensive cloud deletion protection. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect the lifecycle block and any planned destroy operation. Second diagnostic: Review out-of-band deletion protections and provider-level access controls.
Incorrect Answers
B:“Implicit ordering assumptions can create unstable downstream configuration” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
C:“Unnecessary broad depends_on edges can slow plans and create misleading coupling” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
D:“Catching every error can conceal configuration mistakes” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
Question 449
A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Use provider safeguards and backups in addition to plan checks.
- Keep collection keys stable and test rendered block counts.
- Test empty, duplicate and out-of-range port cases.
- Understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration.
- Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Use provider safeguards and backups in addition to plan checks. Together the corrective action and its implementation safeguard need to address the recorded condition: A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. Acceptance requires Terraform blocks unapproved destruction while separate platform controls guard the live object.
D:This is one of the two necessary decisions for a safe design: Understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Together the corrective action and its implementation safeguard need to address the recorded condition: A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. Acceptance requires Terraform blocks unapproved destruction while separate platform controls guard the live object.
Incorrect Answers
B:“Keep collection keys stable and test rendered block counts” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
C:“Test empty, duplicate and out-of-range port cases” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
E:“Evaluate whether a temporary distinct name or staged migration can support create_before_destroy safely” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
Question 450
A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- Terraform blocks unapproved destruction while separate platform controls guard the live object.
- Downstream automation receives only the documented subnet identifier.
- The module outputs a consistent address list matching selected instances.
- The resource exists once with the correct optional logging configuration.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: Terraform blocks unapproved destruction while separate platform controls guard the live object. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Use provider safeguards and backups in addition to plan checks.
Incorrect Answers
B:“Downstream automation receives only the documented subnet identifier” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
C:“The module outputs a consistent address list matching selected instances” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.
D:“The resource exists once with the correct optional logging configuration” would address a different Terraform configuration concern; the source instead describes A team marks a critical storage container with prevent_destroy and assumes it cannot ever be deleted through the provider console or if the resource block is removed. The appropriate design is to understand prevent_destroy as a Terraform planning guard only while the lifecycle rule remains in configuration. Confirm whether terraform blocks unapproved destruction while separate platform controls guard the live object.