skip to content
Alvin Lucillo

Implicit dependencies

/ 1 min read

💻 Tech

Terraform ensures that implicit dependencies are considered when changing the resources. This is because Terraform takes care of the order in which resources are created/modified. In the example below, resource1.identifier1 will always be modified since its id is being referenced to by another resource resource2.identifier2. In this case, the depends_on argument is not needed here.

resource "resource1" "identifier1" {
  field1 = "..."
}

resource "resource2" "identifier2" {
  field1_id = resource1.identifier1.id
  field2 = "..."
}