liveBook · Manning

Declarative configuration

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

Infrastructure configuration is the declarative specification of the resources, properties, relationships, and metadata that make up an infrastructure system.

Infrastructure configuration declaratively specifies the resources, properties, relationships, and metadata that make up an infrastructure system. Treating that specification as code communicates intended architecture and expected state, reducing reliance on individual memory and improving reliability. section 1.4.3 section 7.5

Build and maintain infrastructure configuration around these practices:

  • Compose independent modules for networks, servers, load balancers, databases, and related resources so individual components can change without disturbing the whole system. section 1.3.3
  • Share standardized modules across teams instead of copying unique configurations; allow teams to reproduce established designs and override details for local needs. section 5.0 section 5.1
  • Test configuration and state statically for names, resource counts, address ranges, generated logic, insecure values, and organizational standards before production changes. section 6.2 section 6.2.3
  • Review and deliver changes through version control, automated checks, testing environments, and suitable branching or trunk-based workflows. section 7.5 section 7.2.3
  • Refactor oversized configurations into separate resources or repositories to reduce conflicts, feedback time, blast radius, and security risk without changing existing resources. section 10.0 section 10.1

A composable production environment

A secure hello-world.com environment combines a server, load balancer, private and public networks, routing rules, and a domain name. Replacing the standard load balancer with a premium module leaves the server and network running, while another team can add a database independently. section 1.3.3

Figure 1.9 You build your production environment with building blocks of infrastructure so you can add new resources, like the premium load balancer, easily.

Use the building-block figure to see how network, server, and load-balancer modules combine into a production environment and support low-impact replacement. section 1.3.3

Figure 5.1 Datacenter for Veggies can use modules to organize and standardize infrastructure configuration across application teams.

Use the cross-team figure to compare how standardized network, database, and server modules support reproducibility and composability across application teams. section 5.0

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

How deep it goes
Explains composition, sharing, testing, delivery, branching, and refactoring, while emphasizing practices rather than provider-specific implementation.
Examples
Uses a hello-world.com production stack, shared vegetable-team modules, network unit tests, branching environments, and a refactored singleton repository.
What it assumes
Assumes familiarity with infrastructure resources and team workflows while teaching configuration intent, modularity, testing, delivery, and refactoring practices.
What you can do after
Build it from scratch, compose reusable resources, test configuration statically, collaborate through version control, and refactor safely.
How it connects
Connects infrastructure configuration with infrastructure as code, modularity, composability, testing, continuous delivery, version control, GitOps, and refactoring.

Also explained in

Compare how 6 books explain declarative configuration →

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.