liveBook · Manning

Configuration as code

As explained in Automating API Delivery

Configuration as code is the management of application configuration through descriptive, version-controlled files.

When API deployment settings are changed outside version control, teams can lose track of what changed and allow configurations to drift. Configuration as code (CaC) manages application configuration through descriptive, version-controlled files. Teams can template, roll out, and track changes rather than rely on manual updates. section 1.2 section 1.5.5

CaC applies the version-controlled approach of infrastructure as code to deployed applications rather than infrastructure resources. For API gateways, a declarative configuration states the desired result; an agent sets up the system to match it. An imperative script instead specifies the commands and their order. Keeping the declarative files in Git lets a team collaborate through Git workflows. section 1.2 section 1.5.5

The file to version depends on the API gateway:

  • Amazon API Gateway and Kusk API Gateway can place declarative settings in OpenAPI vendor extensions. section 1.5.5
  • Apigee Edge uses separate declarative configuration files. section 1.5.5
  • Kong and Tyk ingress controllers can use Kubernetes Custom Resource Definitions in manifest files. section 1.5.5

The format is gateway-specific, but the operational rule is the same: store the declarative configuration in version control so deployment settings can participate in an APIOps workflow. section 1.5.5

How Automating API Delivery covers it

How deep it goes
Defines the practice and contrasts declarative setup with imperative scripts, but provides no complete configuration file or command walkthrough.
Examples
Identifies OpenAPI vendor extensions, Apigee Edge configuration files, and Kong and Tyk Kubernetes manifests as gateway-specific forms.
What you can do after
Operate/configure it by storing declarative API gateway settings in Git and managing changes through Git workflows.
How it connects
Connects configuration as code to infrastructure as code, GitOps, and declarative API gateway configuration.

Also explained in

Compare how 3 books explain configuration as code →

Related concepts

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