Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 83


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

Show Answer
Correct Answer: B

Terraform can manage resource dependencies automatically by inferring them based on the configuration of resources. The `depends_on` argument is only necessary for creating explicit dependencies when Terraform is unable to infer them automatically. Therefore, the statement that Terraform can only manage resource dependencies if you set them explicitly with the `depends_on` argument is false.

Discussion

18 comments
Sign in to comment
vitasacOption: B
May 4, 2023

I think it's B for sure

gofavad926
Sep 29, 2024

"I think", and "for sure"... are not compatible :D

Ni33
May 9, 2024

B is the correct answer. Terraform do manage implicit dependencies using the attribute values mentioned in the configuration of the resources.

Sunrayk
May 12, 2023

B is the right answer. Mostly Terraform can manage dependencies inherently; depends_on is used for hidden dependencies that Terraform cannot automatically infer

dhez46Option: B
Apr 3, 2024

https://developer.hashicorp.com/terraform/tutorials/0-13/dependencies?in=terraform%2F0-13 Implicit dependencies are the primary way that Terraform understands the relationships between your resources. Sometimes there are dependencies between resources that are not visible to Terraform, however. The depends_on argument is accepted by any resource or module block and accepts a list of resources to create explicit dependencies for.

AnonymousOption: B
Jun 9, 2023

Terraform is smart enough to manage resource dependencies to an extent, without any explicit instructions.

vikramvlr
Dec 14, 2023

Answer is B. Most of the time, Terraform infers dependencies between resources based on the configuration given, so that resources are created and destroyed in the correct order. Occasionally, however, Terraform cannot infer dependencies between different parts of your infrastructure, and you will need to create an explicit dependency with the depends_on argument. https://developer.hashicorp.com/terraform/tutorials/0-13/dependencies?in=terraform%2F0-13

campsOption: B
Mar 31, 2024

B. False. Terraform can manage resource dependencies automatically without explicitly setting them using the depends_on argument.

EltoothOption: A
Jun 28, 2023

I believe A is the correct answer. "Use the depends_on meta-argument to handle hidden resource or module dependencies that Terraform cannot automatically infer. You only need to explicitly specify a dependency when a resource or module relies on another resource's behavior but does not access any of that resource's data in its arguments." https://www.terraform.io/language/meta-arguments/depends_on

RVivek
Sep 24, 2023

You voted A and the comment is in support of B ?

Ahmad_Terraform
Jul 14, 2023

B. False implicit = hidden dependencies Trfm can can manage.

eduvar4
Sep 27, 2023

Answer: B "Most of the time, Terraform infers dependencies between resources based on the configuration given, so that resources are created and destroyed in the correct order" -> https://learn.hashicorp.com/tutorials/terraform/dependencies

Power123
Mar 31, 2024

B is correct. Implicit as well

gofavad926Option: B
Sep 29, 2024

B, false

Zam88
Jun 19, 2023

Manage explicit dependencies Implicit dependencies are the primary way that Terraform understands the relationships between your resources. Sometimes there are dependencies between resources that are not visible to Terraform, however. The depends_on argument is accepted by any resource or module block and accepts a list of resources to create explicit dependencies for. B

Zam88
Jun 21, 2023

I was wrong i have checked it again - Terraform cannot infer dependencies between different parts of your infrastructure, and you will need to create an explicit dependency with the depends_on argument. A is correct answer

Ahmad_Terraform
Jul 1, 2023

B is correct implicit decencies trfm can manage without depends on command, for example in AWS eip resource will be dependent on the Ec2 creation, so trfm will first create the Ec2 and then eip will be allocated/created. and eip creation will be after the creation of Ec2. https://learn.hashicorp.com/tutorials/terraform/dependencies?in=terraform/0-13

kopper2019Option: B
Aug 10, 2023

It is B

GopinathM
Sep 8, 2023

A is correct we need pass explicitly depends_on

j1809
Sep 24, 2023

Terraform automatically infers when one resource depends on another by studying the resource attributes used in interpolation expressions.

resnefOption: B
Jan 10, 2024

you have implicit as well, therefore B