Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 147

How does Terraform determine dependencies between resources?

    Correct Answer: A

    Terraform automatically builds a resource graph based on resources, provisioners, special meta-parameters, and the state file, if present. This resource graph allows Terraform to determine the dependencies between resources so that they can be created, updated, or destroyed in the correct order. Terraform constructs this graph by evaluating the implicit relationships defined in the configuration, as well as any explicit dependencies specified by parameters like depends_on.

Discussion
depal_dhirOption: A

https://learn.hashicorp.com/tutorials/terraform/dependencies

BereOption: A

https://developer.hashicorp.com/terraform/tutorials/configuration-language/dependencies 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.

keiffo2Option: A

A is the correct answer - by way of eliminating the other answers

SilentMilliOption: A

When Terraform evaluates a configuration, it automatically creates a graph of all the resources and their dependencies. Terraform uses this graph to determine the order in which resources need to be created, updated, or destroyed. Terraform looks at resource dependencies based on implicit and explicit relationships between resources, which are defined using properties like count, for_each, depends_on, and others. Terraform can also use the state file to track dependencies between resources and maintain the order of operations during updates

chael88Option: B

Took the exam and passed. There was a similar question like this not listed here on ExamTopics. It goes like this: How does Terraform handle dependencies? A. By using depends_on B. Terraform will automatically handle some resource dependencies I cant remember the other options, but I selected B.