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

17 comments
Sign in to comment
vitasacOption: B
May 4, 2022

I think it's B for sure

gofavad926
Sep 29, 2023

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

Ni33Option: B
May 9, 2023

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

rfdOption: B
Jun 9, 2022

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

vikramvlrOption: B
Dec 14, 2022

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, 2023

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

dhez46Option: B
Apr 3, 2023

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.

EltoothOption: A
Jun 28, 2022

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, 2022

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

Ahmad_TerraformOption: B
Jul 14, 2022

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

eduvar4Option: B
Sep 27, 2022

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

Power123Option: B
Mar 31, 2023

B is correct. Implicit as well

gofavad926Option: B
Sep 29, 2023

B, false

Zam88Option: B
Jun 19, 2022

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, 2022

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_TerraformOption: B
Jul 1, 2022

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, 2022

It is B

GopinathMOption: A
Sep 8, 2022

A is correct we need pass explicitly depends_on

j1809Option: B
Sep 24, 2022

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

resnefOption: B
Jan 10, 2023

you have implicit as well, therefore B