HashiCorp Terraform Associate (HashiCorp Certified: Terraform Associate) Practice Test 41

Question 400

A configuration review examines list, map, object, tuple, and set semantics. The requirement is to convert a compatible value into a homogeneous keyed collection. Which Terraform mechanism directly meets this requirement?

  1. Use tomap(...) to make a map
  2. Use tuple([string, number])
  3. Use type = any sparingly
  4. Use optional(...) in object attributes

Explanation

Correct Answer

A:

Map conversion attempts a common element type for the values; a heterogeneous object may need a more explicit object contract instead; this behavior should be assessed against the concrete need to convert a compatible value into a homogeneous keyed collection. This directly supports the task to convert a compatible value into a homogeneous keyed collection during a planned migration.

Incorrect Answers

B:

Tuples have a declared type for each position; a list(string) would not preserve the intended mixed-element contract; this behavior should be assessed against the concrete need to convert a compatible value into a homogeneous keyed collection. The distinction matters here: using that mechanism to define a fixed-position sequence with different element types would still leave the objective to convert a compatible value into a homogeneous keyed collection unmet.

C:

The any placeholder relaxes static expectations but sacrifices early type guarantees; most module interfaces benefit from a concrete type; this behavior should be assessed against the concrete need to convert a compatible value into a homogeneous keyed collection. It may support a related workflow, but the question specifically requires the mechanism for convert a compatible value into a homogeneous keyed collection rather than permit values of varying shapes where a strict contract is impractical.

D:

Optional attributes let module callers omit selected fields and may provide defaults; they do not make unrelated required object attributes optional; this behavior should be assessed against the concrete need to convert a compatible value into a homogeneous keyed collection. The stated requirement is to convert a compatible value into a homogeneous keyed collection, not to allow an object field to be omitted from a typed input; this alternative addresses a different control or phase.

Question 401

A module author is replacing repetitive HCL with expressions. A reviewer must determine how to parse JSON into Terraform lists, objects, numbers, strings, and Booleans. Which action is the appropriate choice?

  1. Use jsondecode(text)
  2. Use try(expr, fallback)
  3. Use ... in a grouped object for expression
  4. Use alltrue(list_of_bools)

Explanation

Correct Answer

A:

Decoding returns native expression values; it is not a remote data-source read or a YAML parser; this behavior should be assessed against the concrete need to parse JSON into Terraform lists, objects, numbers, strings, and Booleans. This directly supports the task to parse JSON into Terraform lists, objects, numbers, strings, and Booleans during a cross-team handoff.

Incorrect Answers

B:

Try evaluates arguments until one succeeds; it should not mask known structural errors or replace explicit input validation; this behavior should be assessed against the concrete need to parse JSON into Terraform lists, objects, numbers, strings, and Booleans. That can be useful when the aim is to recover from dynamic expression errors with an alternative result, but it does not directly deliver the requested ability to parse JSON into Terraform lists, objects, numbers, strings, and Booleans.

C:

Grouping mode aggregates multiple values under the same generated key; ordinary object comprehensions require unique keys; this behavior should be assessed against the concrete need to parse JSON into Terraform lists, objects, numbers, strings, and Booleans. The distinction matters here: using that mechanism to collect duplicate output keys into lists instead of reporting collisions would still leave the objective to parse JSON into Terraform lists, objects, numbers, strings, and Booleans unmet.

D:

Alltrue is useful for validating all entries in an input list; anytrue instead tests whether at least one entry succeeds; this behavior should be assessed against the concrete need to parse JSON into Terraform lists, objects, numbers, strings, and Booleans. It may support a related workflow, but the question specifically requires the mechanism for parse JSON into Terraform lists, objects, numbers, strings, and Booleans rather than require every evaluated Boolean in a collection to be true.

Question 402

An engineer is diagnosing unexpected resource ordering. The checklist contains independent tasks: (1) delay all operations in a child module until required prerequisites complete; (2) avoid dynamic expressions for create_before_destroy and similar rules. Which two options directly correspond to the respective tasks? Choose TWO.

  1. Use explicit dependencies on module calls carefully
  2. Recognize propagated create_before_destroy behavior
  3. Use replace_triggered_by for resource change coupling
  4. Understand destroy order as dependency-aware
  5. Recognize lifecycle arguments are evaluated early
  6. Use create_before_destroy = true

Explanation

Correct Answers

A:

depends_on on a module applies to the module's relevant actions, not just one output; it may be broader than a targeted output reference; this behavior should be assessed against the concrete need to delay all operations in a child module until required prerequisites complete and avoid dynamic expressions for create_before_destroy and similar rules. This matches the distinct objective to delay all operations in a child module until required prerequisites complete; the remaining chosen features address avoid dynamic expressions for create_before_destroy and similar rules.

E:

These lifecycle settings shape the graph construction stage and typically require literal values; a runtime input cannot freely toggle them as ordinary arguments; this behavior should be assessed against the concrete need to delay all operations in a child module until required prerequisites complete and avoid dynamic expressions for create_before_destroy and similar rules. This matches the distinct objective to avoid dynamic expressions for create_before_destroy and similar rules; the remaining chosen features address delay all operations in a child module until required prerequisites complete.

Incorrect Answers

B:

Terraform may propagate create-before-destroy to dependencies and preserve that decision in state; a downstream replacement can therefore affect upstream lifecycle ordering; this behavior should be assessed against the concrete need to delay all operations in a child module until required prerequisites complete and avoid dynamic expressions for create_before_destroy and similar rules. Its main application is to understand why a dependency may also be retained during a replacement; the checklist instead asks for delay all operations in a child module until required prerequisites complete; and avoid dynamic expressions for create_before_destroy and similar rules. None of those distinct criteria specifically calls for this alternative.

C:

The rule ties replacement to planned actions on managed resources; plain local values do not themselves have planned resource actions; this behavior should be assessed against the concrete need to delay all operations in a child module until required prerequisites complete and avoid dynamic expressions for create_before_destroy and similar rules. Its main application is to replace a resource when another managed resource or attribute changes; the checklist instead asks for delay all operations in a child module until required prerequisites complete; and avoid dynamic expressions for create_before_destroy and similar rules. None of those distinct criteria specifically calls for this alternative.

D:

Terraform generally reverses dependency order for teardown; this minimizes failures caused by destroying prerequisites too early; this behavior should be assessed against the concrete need to delay all operations in a child module until required prerequisites complete and avoid dynamic expressions for create_before_destroy and similar rules. Its main application is to remove dependents before the infrastructure they rely on; the checklist instead asks for delay all operations in a child module until required prerequisites complete; and avoid dynamic expressions for create_before_destroy and similar rules. None of those distinct criteria specifically calls for this alternative.

F:

This lifecycle rule can reduce service interruption where unique names and quotas allow coexistence; it cannot guarantee an API permits two simultaneous objects; this behavior should be assessed against the concrete need to delay all operations in a child module until required prerequisites complete and avoid dynamic expressions for create_before_destroy and similar rules. Its main application is to request creation of a replacement before deleting the old instance; the checklist instead asks for delay all operations in a child module until required prerequisites complete; and avoid dynamic expressions for create_before_destroy and similar rules. None of those distinct criteria specifically calls for this alternative.

Question 403

In a planned migration, the requested result is to reject malformed or disallowed input before resource creation. What should the engineer select?

  1. Use a precondition rather than a check for an unsafe prerequisite
  2. Use assert { condition = ... } inside check
  3. Use a resource precondition
  4. Use variable validation for valid network prefixes
  5. Use error_message for actionable custom diagnostics

Explanation

Correct Answer

D:

Functions like can(cidrhost(...)) can validate address-format assumptions; this is input correctness, distinct from connectivity tests of a deployed network; this behavior should be assessed against the concrete need to reject malformed or disallowed input before resource creation. This directly supports the task to reject malformed or disallowed input before resource creation during a deployment checklist.

Incorrect Answers

A:

Blocking conditions are appropriate when continuing could create invalid infrastructure; a check block typically reports a warning and lets operations proceed; this behavior should be assessed against the concrete need to reject malformed or disallowed input before resource creation. The distinction matters here: using that mechanism to stop a deployment when a required assumption fails would still leave the objective to reject malformed or disallowed input before resource creation unmet.

B:

An assert block carries the condition and explanatory error text for a named check; it is not a normal managed resource declaration; this behavior should be assessed against the concrete need to reject malformed or disallowed input before resource creation. It may support a related workflow, but the question specifically requires the mechanism for reject malformed or disallowed input before resource creation rather than express the Boolean invariant and its diagnostic message.

C:

A lifecycle precondition can inspect values needed for a safe operation; failure blocks proceeding instead of simply recording a health warning; this behavior should be assessed against the concrete need to reject malformed or disallowed input before resource creation. The stated requirement is to reject malformed or disallowed input before resource creation, not to verify an assumption before Terraform processes the target resource operation; this alternative addresses a different control or phase.

E:

Variable validation and lifecycle conditions support custom messages; a vague error message makes troubleshooting harder even when the Boolean test is correct; this behavior should be assessed against the concrete need to reject malformed or disallowed input before resource creation. The distinction matters here: using that mechanism to tell users which contract failed and why would still leave the objective to reject malformed or disallowed input before resource creation unmet.

Question 404

An engineer needs to retrieve or distribute sensitive credentials under explicit access policy as part of a planned migration. Which option is the best fit?

  1. Avoid unnecessary nonsensitive(...) calls
  2. Mark a variable sensitive = true
  3. Use Vault to centralize secret access
  4. Treat saved plan files as sensitive artifacts
  5. Protect access to remote state

Explanation

Correct Answer

C:

Vault provides secret-management and credential capabilities; its Terraform provider can integrate with Vault APIs, but ordinary read results may still be recorded unless ephemeral patterns are used; this behavior should be assessed against the concrete need to retrieve or distribute sensitive credentials under explicit access policy. This directly supports the task to retrieve or distribute sensitive credentials under explicit access policy during a maintenance request.

Incorrect Answers

A:

Nonsensitive removes the sensitivity mark from a value; it does not erase the underlying secret and can expose it in outputs or logs; this behavior should be assessed against the concrete need to retrieve or distribute sensitive credentials under explicit access policy. That can be useful when the aim is to preserve Terraform's safety indicator for secret-bearing expressions, but it does not directly deliver the requested ability to retrieve or distribute sensitive credentials under explicit access policy.

B:

Sensitivity propagates through expressions and hides values in many UI contexts; it does not, by itself, keep the original secret out of state or saved plan files; this behavior should be assessed against the concrete need to retrieve or distribute sensitive credentials under explicit access policy. The distinction matters here: using that mechanism to hide a secret from ordinary CLI displays would still leave the objective to retrieve or distribute sensitive credentials under explicit access policy unmet.

D:

Binary plans can preserve configuration values and secrets; redaction in human-readable output does not make the saved plan safe to publish; this behavior should be assessed against the concrete need to retrieve or distribute sensitive credentials under explicit access policy. The stated requirement is to retrieve or distribute sensitive credentials under explicit access policy, not to avoid leaking inputs and backend information through CI downloads; this alternative addresses a different control or phase.

E:

A remote backend may encrypt stored state and enforce access controls; terraform sensitive annotations do not replace backend security; this behavior should be assessed against the concrete need to retrieve or distribute sensitive credentials under explicit access policy. That can be useful when the aim is to secure resource attributes and possibly persisted secrets, but it does not directly deliver the requested ability to retrieve or distribute sensitive credentials under explicit access policy.

Question 405

A Terraform rollout has separate acceptance criteria: obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources. Which combined approach directly satisfies the two criteria?

  1. Use an ephemeral resource for supported temporary data + Read data sources during planning when inputs are known
  2. Use an ephemeral resource for supported temporary data + Keep a data lookup separate from a same-object managed declaration
  3. Recognize terraform_data as a built-in managed resource + Keep a data lookup separate from a same-object managed declaration
  4. Declare a managed object with resource + Reference data.aws_ami.base.id for a lookup

Explanation

Correct Answer

B:

For the first criterion, ephemeral resources are available for supported providers and valid contexts; they are not ordinary managed resources with persistent state identity; this behavior should be assessed against the concrete need to obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources; this directly addresses the need to obtain a short-lived value without persisting it in state or plan. For the separate second criterion, a data source can read attributes but does not change who owns the underlying object; managing and reading one object need careful dependency design to avoid deferred or inconsistent reads; this behavior should be assessed against the concrete need to obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources; this fulfills the need to avoid mistaking two views of one API object for independent resources. Together they cover the independent tasks of obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure meets the requirement to obtain a short-lived value without persisting it in state or plan, but its partner serves a different role: Terraform normally asks the provider to read data sources during a plan; reads may be deferred when inputs or dependent changes are not yet known; this behavior should be assessed against the concrete need to obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources. That second component is designed to retrieve remote information for evaluating the proposed change, so the still-missing criterion is to avoid mistaking two views of one API object for independent resources, while the first criterion remains obtain a short-lived value without persisting it in state or plan.

C:

The second measure does meet the avoid mistaking two views of one API object for independent resources requirement, but the first is designed for another concern: The built-in Terraform provider supplies this resource for lifecycle-oriented uses; it is not a general substitute for querying arbitrary cloud objects; this behavior should be assessed against the concrete need to obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources. That first component is designed to store arbitrary values or trigger replacements without a third-party resource API, which does not accomplish the requested task to obtain a short-lived value without persisting it in state or plan, even though the other measure satisfies avoid mistaking two views of one API object for independent resources.

D:

The first measure is intended to ask Terraform to own the lifecycle of a remote object: A resource block is part of the desired managed infrastructure; terraform tracks its remote identity in state and may create, update, replace, or destroy it; this behavior should be assessed against the concrete need to obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources. The second measure is intended to use an attribute returned by a provider data source: The data. address prefix distinguishes a read-only lookup from a managed resource address; its value can feed managed resources without importing the looked-up object; this behavior should be assessed against the concrete need to obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources. Neither is the directly designated method for the separate goals of obtain a short-lived value without persisting it in state or plan and avoid mistaking two views of one API object for independent resources in this review.

Question 406

An engineer needs to let Terraform infer safe operation order through data flow as part of an automated release. Which option is the best fit?

  1. Use depends_on for hidden ordering requirements
  2. Use direct attribute references to create implicit dependencies
  3. Use resource_type.name.attribute
  4. Use output to expose child internals intentionally

Explanation

Correct Answer

B:

A resource that consumes another's attribute implicitly depends on it; explicit depends_on is unnecessary when the reference already captures the ordering need; this behavior should be assessed against the concrete need to let Terraform infer safe operation order through data flow. This directly supports the task to let Terraform infer safe operation order through data flow during an infrastructure audit.

Incorrect Answers

A:

Terraform's graph uses the explicit edge even without a data reference; overusing whole-resource dependencies may defer reads and reduce concurrency; this behavior should be assessed against the concrete need to let Terraform infer safe operation order through data flow. The stated requirement is to let Terraform infer safe operation order through data flow, not to declare a relationship that cannot be expressed through an input attribute; this alternative addresses a different control or phase.

C:

The expression resolves through the address and provider schema; terraform sees the dependency and can wait for an unknown computed value until apply; this behavior should be assessed against the concrete need to let Terraform infer safe operation order through data flow. The distinction matters here: using that mechanism to read a named attribute from a managed resource would still leave the objective to let Terraform infer safe operation order through data flow unmet.

D:

An output value makes selected internal attributes available as module.name.output; child resources themselves remain encapsulated behind the module boundary; this behavior should be assessed against the concrete need to let Terraform infer safe operation order through data flow. It may support a related workflow, but the question specifically requires the mechanism for let Terraform infer safe operation order through data flow rather than create a stable boundary for modules that callers depend on.

Question 407

A reviewer is auditing variable scopes and disclosure behavior. The requirement is to obtain structured output values in scripts. Which Terraform mechanism directly meets this requirement?

  1. Mark an input variable ephemeral = true
  2. Mark a sensitive output sensitive = true
  3. Omit default to require a variable value
  4. Use terraform output -json for machine-readable results

Explanation

Correct Answer

D:

JSON mode includes values and sensitivity metadata; downstream tooling must treat sensitive data carefully; this command reads recorded outputs, not arbitrary provider API properties; this behavior should be assessed against the concrete need to obtain structured output values in scripts. This directly supports the task to obtain structured output values in scripts during a planned migration.

Incorrect Answers

A:

Ephemeral inputs have restricted reference contexts such as provider blocks and write-only arguments; sensitivity by itself does not provide the same omission guarantee; this behavior should be assessed against the concrete need to obtain structured output values in scripts. It may support a related workflow, but the question specifically requires the mechanism for obtain structured output values in scripts rather than prevent a temporary secret from being persisted to state and plan files.

B:

Sensitive outputs are redacted in typical CLI presentation but remain recoverable from state by authorized readers; a root output is not secure secret storage; this behavior should be assessed against the concrete need to obtain structured output values in scripts. The stated requirement is to obtain structured output values in scripts, not to avoid showing a secret output value in normal human-readable CLI displays; this alternative addresses a different control or phase.

C:

A variable without a default is required; terraform prompts when interactive input is allowed or reports missing input otherwise; this behavior should be assessed against the concrete need to obtain structured output values in scripts. That can be useful when the aim is to make callers supply a necessary input during planning or applying, but it does not directly deliver the requested ability to obtain structured output values in scripts.

Question 408

During a module implementation, one task is to look up values by arbitrary string keys, while another is to define a fixed-position sequence with different element types. Select the matching pair of techniques.

  1. Use structural object attributes in module interfaces + Use object({ name = string, enabled = bool })
  2. Use map(string) for named string values + Use set(string) for unique unordered strings
  3. Use map(string) for named string values + Use tuple([string, number])
  4. Use tomap(...) to make a map + Use tuple([string, number])

Explanation

Correct Answer

C:

For the first criterion, maps provide a homogeneous value type and stable keys; they differ from lists, which are indexed by position; this behavior should be assessed against the concrete need to look up values by arbitrary string keys and define a fixed-position sequence with different element types; this directly addresses the need to look up values by arbitrary string keys. For the separate second criterion, tuples have a declared type for each position; a list(string) would not preserve the intended mixed-element contract; this behavior should be assessed against the concrete need to look up values by arbitrary string keys and define a fixed-position sequence with different element types; this fulfills the need to define a fixed-position sequence with different element types. Together they cover the independent tasks of look up values by arbitrary string keys and define a fixed-position sequence with different element types without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure is intended to validate required properties rather than accepting arbitrary untyped maps: A typed object can express nested requirements clearly; it improves errors when a caller omits a field or supplies an incompatible value; this behavior should be assessed against the concrete need to look up values by arbitrary string keys and define a fixed-position sequence with different element types. The second measure is intended to specify a named record with different attribute types: An object defines an exact attribute schema rather than a homogeneous map; terraform checks and may convert compatible input shapes to that contract; this behavior should be assessed against the concrete need to look up values by arbitrary string keys and define a fixed-position sequence with different element types. Neither is the directly designated method for the separate goals of look up values by arbitrary string keys and define a fixed-position sequence with different element types in this review.

B:

The first measure meets the requirement to look up values by arbitrary string keys, but its partner serves a different role: Sets discard duplicate elements and are not an ordered sequence; this changes instance-key considerations if used with for_each; this behavior should be assessed against the concrete need to look up values by arbitrary string keys and define a fixed-position sequence with different element types. That second component is designed to enforce uniqueness without relying on list positions, so the still-missing criterion is to define a fixed-position sequence with different element types, while the first criterion remains look up values by arbitrary string keys.

D:

The second measure does meet the define a fixed-position sequence with different element types requirement, but the first is designed for another concern: Map conversion attempts a common element type for the values; a heterogeneous object may need a more explicit object contract instead; this behavior should be assessed against the concrete need to look up values by arbitrary string keys and define a fixed-position sequence with different element types. That first component is designed to convert a compatible value into a homogeneous keyed collection, which does not accomplish the requested task to look up values by arbitrary string keys, even though the other measure satisfies define a fixed-position sequence with different element types.

Question 409

The immediate Terraform task is to append sequences while retaining element order. Which method handles that task most directly?

  1. Use format("%s-%d", name, number)
  2. Use concat(list1, list2)
  3. Use replace(text, old, new)
  4. Use join(delimiter, list)

Explanation

Correct Answer

B:

Concat combines lists or tuples into one sequence; it does not remove duplicates as a set conversion would; this behavior should be assessed against the concrete need to append sequences while retaining element order. This directly supports the task to append sequences while retaining element order during a platform review.

Incorrect Answers

A:

Format substitutes values into placeholders; it does not validate whether the resulting identifier is accepted by a cloud provider; this behavior should be assessed against the concrete need to append sequences while retaining element order. That can be useful when the aim is to build a string using a controlled formatting pattern, but it does not directly deliver the requested ability to append sequences while retaining element order.

C:

Replace performs value transformation during evaluation; it does not trigger replacement of a managed resource by itself; this behavior should be assessed against the concrete need to append sequences while retaining element order. It may support a related workflow, but the question specifically requires the mechanism for append sequences while retaining element order rather than substitute matching text or patterns in a string.

D:

Join forms one string from elements; split performs the reverse direction on a string; this behavior should be assessed against the concrete need to append sequences while retaining element order. The stated requirement is to append sequences while retaining element order, not to combine a sequence of strings with a separator; this alternative addresses a different control or phase.

Question 410

A Terraform rollout has separate acceptance criteria: break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on. Which combined approach directly satisfies the two criteria?

  1. Avoid a circular dependency graph + Understand destroy order as dependency-aware
  2. Avoid a circular dependency graph + Use explicit dependencies on module calls carefully
  3. Use graph parallelism for independent resources + Understand destroy order as dependency-aware
  4. Recognize lifecycle arguments are evaluated early + Use replace_triggered_by for resource change coupling

Explanation

Correct Answer

A:

For the first criterion, terraform cannot schedule a true cycle in its directed acyclic graph; rearranging references or splitting resource responsibilities can remove the cycle; this behavior should be assessed against the concrete need to break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on; this directly addresses the need to break mutual dependencies that prevent Terraform from ordering operations. For the separate second criterion, terraform generally reverses dependency order for teardown; this minimizes failures caused by destroying prerequisites too early; this behavior should be assessed against the concrete need to break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on; this fulfills the need to remove dependents before the infrastructure they rely on. Together they cover the independent tasks of break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on without exchanging the responsibilities of these features.

Incorrect Answers

B:

The first measure meets the requirement to break mutual dependencies that prevent Terraform from ordering operations, but its partner serves a different role: depends_on on a module applies to the module's relevant actions, not just one output; it may be broader than a targeted output reference; this behavior should be assessed against the concrete need to break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on. That second component is designed to delay all operations in a child module until required prerequisites complete, so the still-missing criterion is to remove dependents before the infrastructure they rely on, while the first criterion remains break mutual dependencies that prevent Terraform from ordering operations.

C:

The second measure does meet the remove dependents before the infrastructure they rely on requirement, but the first is designed for another concern: Terraform can schedule independent graph nodes in parallel within its configured limit; artificial dependencies reduce parallel execution; this behavior should be assessed against the concrete need to break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on. That first component is designed to allow unrelated operations to proceed concurrently, which does not accomplish the requested task to break mutual dependencies that prevent Terraform from ordering operations, even though the other measure satisfies remove dependents before the infrastructure they rely on.

D:

The first measure is intended to avoid dynamic expressions for create_before_destroy and similar rules: These lifecycle settings shape the graph construction stage and typically require literal values; a runtime input cannot freely toggle them as ordinary arguments; this behavior should be assessed against the concrete need to break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on. The second measure is intended to replace a resource when another managed resource or attribute changes: The rule ties replacement to planned actions on managed resources; plain local values do not themselves have planned resource actions; this behavior should be assessed against the concrete need to break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on. Neither is the directly designated method for the separate goals of break mutual dependencies that prevent Terraform from ordering operations and remove dependents before the infrastructure they rely on in this review.

HashiCorp Certified: Terraform Associate (Terraform Associate) Practice Tests