liveBook · Manning

Brownfield environment

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

An existing environment containing active infrastructure resources that were created or managed before the current infrastructure-as-code definition.

A brownfield environment contains active infrastructure resources created or managed before the current infrastructure-as-code definition. Unlike a greenfield environment, it must transition from mutable, manual changes to automatically managed immutable configuration without losing existing resources. section 2.2.2

Migrate a brownfield environment by preserving its actual resource state:

  • Inventory networks, servers, load balancers, firewalls, and DNS entries. section 2.2.2
  • Identify base infrastructure, such as networks, before dependent resources. section 2.2.2
  • Inspect the provider API and reproduce each resource’s actual configuration in IaC, including names and CIDR blocks. section 2.2.2
  • Choose whether to import, re-create, or conditionally detect each resource, then rerun IaC and reconcile drift. section 2.2.2
  • Migrate servers and databases after their networks, followed by resources with fewer dependencies or configuration requirements. 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, dependency ordering, state matching, migration choices, and drift risks without detailing provider-specific commands.
Examples
Uses development networks, servers, databases, load balancers, firewalls, and DNS entries as migration targets.
What it assumes
Assumes familiarity with infrastructure resources and IaC while demonstrating how to inspect an existing environment through a provider API.
What you can do after
Apply an ordered migration that captures existing resources in IaC while minimizing accidental changes caused by drift.
How it connects
Connects infrastructure as code, greenfield environments, immutable infrastructure, infrastructure drift, and provisioning tools.

Also explained in

Compare how 3 books explain brownfield environment →

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.