liveBook · Manning

Base infrastructure

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

Base infrastructure is the foundational set of resources on which other infrastructure resources depend.

Base infrastructure is the foundational set of resources that other infrastructure resources require. In an infrastructure-as-code migration, networks commonly provide this foundation for servers, databases, load balancers, and firewalls. section 2.2.2

Migrate base infrastructure before dependent resources:

  • Inventory the existing resources and identify their dependencies. section 2.2.2
  • Reverse-engineer each network’s name and CIDR block from the provider API, then reproduce its actual state in code. section 2.2.2
  • Import existing networks into the provisioning tool’s state when possible; otherwise recreate them or check for their existence conditionally. section 2.2.2
  • Rerun the IaC and verify that no drift remains before migrating servers, databases, and other dependent resources. section 2.2.2

Development environment migration

A brownfield hello-world environment contains database and development networks, servers, load balancers, firewalls, and DNS entries. Encode the networks first, then migrate the server and database resources that depend on them. section 2.2.2

Figure 2.5 Reverse engineer the networks for the database and server first and write their configurations as code.

Shows how to reverse-engineer the database and server networks before writing their configurations as code. section 2.2.2

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

How deep it goes
Explains inventory, reconstruction, import, rerun, and drift checks, but stops short of provider-specific implementation details.
Examples
Uses development networks supporting servers and databases, alongside load balancers, firewalls, and DNS entries.
What it assumes
Assumes an existing infrastructure environment and provider API access, while teaching how to identify and migrate its foundational resources.
What you can do after
Operate/configure a provisioning-tool migration that encodes foundational networks and reconciles their actual state.
How it connects
Connects infrastructure as code with immutable infrastructure, resource dependencies, provisioning tools, and infrastructure drift.

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.