Skip to main content
InterviewHubPRO
Section Overview
Q14

Question 14 of 50

Part 1: Terraform Core Architecture, HCL & Providers (1 - 15)

28%
Terraform & IaC (50 Qs)•Part 1: Terraform Core Architecture, HCL & Providers (1 - 15)

Explicit Dependencies (`depends_on`) vs. Implicit Dependencies in the Resource Graph.

senior LevelFormsCI/CD & DevOpsSystem Design

In Simple Words:

  • Implicit Dependency (Automatic): When you reference an attribute of one resource in another (e.g. vpc_id = aws_vpc.main.id). Terraform automatically infers that aws_vpc.main must be created first.
  • Explicit Dependency (depends_on): Used when two resources have a hidden dependency not expressed in HCL references (e.g. an S3 bucket notification policy depends on an IAM role having propagated). Overusing depends_on limits Terraform's ability to run operations in parallel.