nerdexam
HashiCorp

TA-002-P · Question #83

Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

The correct answer is B. False. Terraform primarily manages resource dependencies implicitly by analyzing attribute references between resources in the configuration, automatically determining the correct order of operations. The depends_on argument is used only for explicit dependencies that cannot be…

Read, generate, and modify configuration

Question

Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

Options

  • ATrue
  • BFalse

How the community answered

(31 responses)
  • A
    19% (6)
  • B
    81% (25)

Why each option

Terraform primarily manages resource dependencies implicitly by analyzing attribute references between resources in the configuration, automatically determining the correct order of operations. The `depends_on` argument is used only for explicit dependencies that cannot be inferred automatically.

ATrue

This is incorrect because Terraform automatically infers many dependencies based on resource attribute references; `depends_on` is for edge cases.

BFalseCorrect

This statement is False. Terraform is capable of inferring most resource dependencies automatically by analyzing the configuration and identifying when one resource's attribute is used in another resource's definition. The `depends_on` argument is specifically for explicit dependencies that Terraform cannot automatically infer.

Concept tested: Terraform implicit and explicit dependencies

Source: https://developer.hashicorp.com/terraform/language/expressions/references#implicit-and-explicit-dependencies

Topics

#dependencies#depends_on argument#implicit dependencies#resource ordering

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice