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…
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)- A19% (6)
- B81% (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.
This is incorrect because Terraform automatically infers many dependencies based on resource attribute references; `depends_on` is for edge cases.
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
Community Discussion
No community discussion yet for this question.