depends_on meta-argument

The depends_on argument, which tells Terraform one resource must wait for another when no reference shows that relationship.

In more detail

Terraform infers almost all ordering from references, so depends_on is only for real but hidden relationships, such as a permission that must exist before a service can use it. Overusing it makes plans slower and more conservative, because more values stay unknown until apply.

Example

depends_on = [null_resource.network]

Related terms

Related guides

Taught in

References

Certification courses