depends_on
In Terraform, sometimes the order in which resources are created, updated, or destroyed is important because some resources might rely on others. For example, you might not want a virtual machine to be created before the network it relies on is set up.
However, there are situations where Terraform cannot infer dependencies from the configuration alone, especially when the dependency is indirect or based on operational considerations outside of Terraform's knowledge.
The depends_on meta-parameter is used for this purpose. You can add depends_on to any resource block to explicitly specify that the resource depends on other resources. Terraform will ensure that the resources listed in depends_on are created before the resource that defines the dependency.