liveBook · Manning

Don't repeat yourself principle

As explained in Effective Platform Engineering

The DRY principle is the practice of avoiding duplicated knowledge or logic by maintaining a single authoritative representation.

The DRY principle keeps knowledge and logic in one authoritative representation instead of duplicating it across infrastructure, credentials, environments, or pipelines. section 6.3.3

Apply DRY by:

  • Pulling secrets from a secrets manager when needed rather than copying them into pipeline-tool environment stores. section 6.3.3
  • Sharing infrastructure code across environments and expressing differences through configuration parameters such as tfvars. section 6.3.3
  • Keeping pipelines focused on ordering while reusable, versioned scripts or pipeline libraries contain shared logic. section 6.3.3

Environment-specific infrastructure

Instead of maintaining separate infrastructure folders or long-lived branches for each environment, reuse the same code and supply environment-specific parameters. section 6.3.3

Figure 6.10 Well-architected Infrastructure-as-code pipelines are no different from well-architected regular software pipelines. This is why we prefer the term “software-defined infrastructure” to differentiate between simply using an infrastructure-as-code (IaC) framework like Terraform and the software engineering practices that are a part of sustainable, high-quality software developer lifecycle management of an engineering platform product.
A screenshot of a diagram

AI-generated content may be incorrect.

Relates DRY infrastructure practices to software-defined infrastructure and well-architected delivery pipelines. section 6.3.3

How Effective Platform Engineering covers it

How deep it goes
Explains practical implementation patterns and consequences, but stops short of broader theoretical treatment.
Examples
Uses secrets-manager lookups, tfvars-based environments, CircleCI orbs, shell-script libraries, and namespace-level pipelines.
What it assumes
Assumes familiarity with infrastructure code, deployment pipelines, environment configuration, and secrets managers.
What you can do after
Configure shared infrastructure and pipeline logic while limiting environment-specific differences to parameters and protecting credential rotation.
How it connects
Connects infrastructure as code with secrets management, environment configuration, reusable pipeline code, and software-defined infrastructure.

Also explained in

Compare how 10 books explain don't repeat yourself principle →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Platform Engineering. The section links point to the parts of the book it draws on.