Updated on 2023-12-13 GMT+08:00

depends_on

A Terraform configuration file can contain multiple resources. By referencing the attribute values of other resources in a resource, Terraform can automatically infer the dependencies of the resource. However, the dependencies of some resources are invisible to Terraform. Therefore, depends_on is needed to create explicit dependencies. You can use depends_on to change the creation or execution sequence of resources so that the resources are processed after the dependent resources. The expression of depends_on is the address list of dependent resources.