liveBook · Manning

Dependency graph

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

A dependency graph represents infrastructure resources and the dependency relationships among them.

A dependency graph represents infrastructure resources and the relationships that determine how infrastructure-as-code changes are applied. During brownfield migration, reconstructing this graph turns live infrastructure into a reliable source of truth. section 2.2.2

Use dependency order to structure migration:

  • Migrate accounts, provider isolation, service accounts, networks, subnetworks, routing, and root DNS first. section 2.2.2
  • Migrate servers, queues, and databases after their supporting infrastructure exists. section 2.2.2
  • Migrate orchestration platforms and application deployments after the compute layer. section 2.2.2
  • Leave resources with the fewest dependencies, or those requiring server and database configuration, until later. section 2.2.2

Infrastructure migration

Reverse-engineer the networks supporting a database and server, write those configurations as code, then migrate the server and database resources that depend on them.

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Defines the graph and supplies an ordered migration procedure across foundational, compute, orchestration, and application resources.
Examples
Uses networks, servers, databases, queues, DNS, SSL certificates, and Kubernetes deployments as migration examples.
What it assumes
Assumes a brownfield environment and introduces dependency assessment for converting it into infrastructure as code.
What you can do after
Apply it via Terraform by assessing dependencies and sequencing resource migration from foundational infrastructure upward.
How it connects
Connects infrastructure as code with immutable infrastructure, Terraform, networks, IAM, DNS, databases, and Kubernetes.

Also explained in

Compare how 5 books explain dependency graph →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.