Infrastructure as code
Infrastructure as code is the practice of defining, provisioning, and managing computing infrastructure through machine-readable code or configuration rather than manual procedures.
Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform
An infrastructure as code tool is software that provisions, configures, updates, or otherwise manages infrastructure from code or declarative configuration.
- How it is used
- Automates infrastructure changes for scalable, reliable, secure operations and more controlled collaboration.
- How deep it goes
- Explains principles, CRUD operations, immutability, testing, and delivery workflows without requiring one specific tool or platform.
- Examples
- Demonstrates server package updates, development-to-production reproduction, network testing, and Python-generated Terraform configuration.
- What you can do after
- Apply it via Python and Terraform to reproduce, test, update, and remove infrastructure with less drift and failure risk.
Grokking Software Architecture
Infrastructure as Code is the practice of defining and managing infrastructure through machine-readable configuration files rather than manual procedures.
- How it is used
- Replaces manual cloud setup with version-controlled blueprints for repeatable provisioning and management.
- How deep it goes
- Explains declarative configuration, state reconciliation, review, and team locking, without requiring memorization of provider-specific syntax.
- Examples
- Uses a storage-bucket resource, a database storage change, and a production outage to illustrate infrastructure automation and review.
- What you can do after
- Apply it via Terraform to automate a small cloud resource and review infrastructure changes.
Read how Grokking Software Architecture explains infrastructure as code →
Effective Platform Engineering
Infrastructure as code is the practice of defining and managing infrastructure through machine-readable configuration files and automation.
- How it is used
- Uses infrastructure as code to make platform provisioning and changes consistent, repeatable, and version-controlled across environments.
- How deep it goes
- Explains declarative framework selection and gives pipeline, secrets, reuse, and testing practices without a complete implementation walkthrough.
- Examples
- Illustrates cloud servers, databases, and networking provisioned across environments, plus Terraform tfvars for environment-specific parameters.
- What you can do after
- Apply it via Terraform to define cloud resources, then use pipelines and recurring tests to manage changes and detect drift.
Read how Effective Platform Engineering explains infrastructure as code →
Acing the CCNA Exam: Volume 2 Advanced Networking and Security
Infrastructure as code is the practice of defining and managing infrastructure through machine-readable configuration rather than manual operations.
- How it is used
- Automates and standardizes infrastructure provisioning and configuration across growing, complex networks.
- How deep it goes
- Defines IaC, compares tool models, and demonstrates configuration artifacts; stops short of detailed implementation procedures.
- Examples
- Uses network configuration templates, YAML variables, Ansible files, Terraform HCL, and Puppet DSL declarations.
- What you can do after
- Evaluate IaC tools by architecture, workflow, language, and primary role, then recognize their infrastructure-management use cases.
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
The practice of defining, provisioning, and managing infrastructure through machine-readable code.
- How it is used
- Automates cloud infrastructure creation and updates alongside microservices deployment.
- How deep it goes
- Works through initialization, application, iterative changes, destruction, and recreation, while directing readers to further Terraform resources.
- Examples
- Uses an Azure resource group and a Kubernetes cluster, then changes a node pool's VM size.
- What you can do after
- Applies infrastructure as code via Terraform to create, update, destroy, and recreate cloud resources.
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
Infrastructure as code is the practice of defining and managing infrastructure through machine-readable configuration files and software development workflows.
- How it is used
- Uses IaC to turn manual infrastructure provisioning into reusable, reproducible Terraform deployments.
- How deep it goes
- Explains desired-state planning, dependency inference, deployment steps, and code checks; defers plan-side policy enforcement.
- Examples
- Illustrates IaC with a reusable AWS VPC, application-and-database dependencies, and a rule favoring GP3 over GP2 volumes.
- What you can do after
- Apply it via Terraform to define reusable infrastructure, inspect a plan, deploy changes, and add predeployment checks.
Azure Security
Infrastructure as code is the practice of defining and managing infrastructure through machine-readable configuration files and automation rather than manual procedures.
- How it is used
- Streamlines deployment, configuration, and management of Azure security through programmable desired-state definitions.
- How deep it goes
- Defines desired-state IaC and explains version control, CI/CD workflows, drift prevention, and a Defender plan automation scenario.
- Examples
- Uses a GitHub Actions workflow, Azure service principal, Azure CLI, and Defender for Cloud plans across Azure subscriptions.
- What you can do after
- Operate/configure repeatable Azure security deployments through IaC, version control, and CI/CD workflows.
AI-Powered Developer: Build software with ChatGPT and Copilot
Infrastructure as code is the practice of defining and managing infrastructure through versioned machine-readable configuration rather than manual operations.
- How it is used
- Uses Terraform and automation to move a tested containerized application from local development toward AWS deployment.
- How deep it goes
- Works through Terraform descriptors for an EC2 host and connects them to CI/CD automation, without detailing all cloud-provider provisioning complexities.
- Examples
- Uses an EC2 Terraform file with Docker startup commands and a GitHub Actions workflow that builds, pushes, and deploys an image.
- What you can do after
- Operate/configure AWS deployment infrastructure through Terraform files and review AI-generated definitions for missing operational requirements.
Crack Any Codebase with AI
Infrastructure as code is the practice of declaring and provisioning infrastructure resources through machine-readable files or programs.
- How it is used
- Maps managed cloud resources as one architectural layer in distributed-system investigations.
- How deep it goes
- Defines IaC through Terraform resources and distinguishes its cloud view from local services, external APIs, and application connections.
- Examples
- Uses Terraform declarations for PostgreSQL, an S3 bucket, and an SQS queue.
- What you can do after
- Evaluate architecture by inventorying provisioned resources and cross-checking them against services and runtime connections.
Read how Crack Any Codebase with AI explains infrastructure as code →
Automating API Delivery
Infrastructure as code is the declarative definition and management of infrastructure resources and topologies in version-controlled files.
- How it is used
- Uses descriptive resource definitions to replace manual provisioning and reduce environment drift.
- How deep it goes
- Defines the practice and names tools and benefits, but provides no provisioning commands or configuration walkthrough.
- Examples
- Names networks, virtual machines, and load balancers as resources, and Terraform, Ansible, and AWS CloudFormation as tools.
- What you can do after
- Apply it via Terraform, Ansible, or AWS CloudFormation to automate provisioning and recreate environments.
Read how Automating API Delivery explains infrastructure as code →
Amazon Web Services in Action, Third Edition: An in-depth guide to AWS
Infrastructure as code is the practice of defining and provisioning computing infrastructure through machine-readable code or declarative configuration.
- How it is used
- Automates repeatable AWS infrastructure creation and modification through CLI commands, SDK programs, or CloudFormation templates.
- How deep it goes
- Defines infrastructure, contrasts imperative and declarative control, and walks through an EC2 CloudFormation stack without covering later networking details.
- Examples
- Uses AWS resource blueprints, an EC2 template, parameters, and a CloudFormation stack update that changes an instance type.
- What you can do after
- Operate/configure AWS infrastructure reproducibly with CLI scripts, SDK code, or declarative CloudFormation templates.
Delivering Machine Learning Projects: From design to deployment
Infrastructure as code is the declarative or programmatic management of computing infrastructure through versioned machine-readable definitions.
- How it is used
- Uses machine-readable definitions to rapidly instantiate project environments and supporting services.
- How deep it goes
- Explains rapid instantiation, inspection, and reporting, but does not detail definition syntax or automation internals.
- Examples
- Uses the Bike Shop’s dev, test, and production environments as a delivery example.
- What you can do after
- Operate project environments through rapid instantiation, inspection, and infrastructure reporting.
Google Anthos in Action
Infrastructure as Code is the practice of defining and managing computing infrastructure through machine-readable configuration rather than manual procedures.
- How it is used
- Manages cloud and cluster infrastructure as repeatable configuration within DevOps, SRE, and continuous-delivery operations.
- How deep it goes
- Defines declarative target state, provider mappings, repository workflows, and a GKE on AWS deployment, without detailing full Terraform syntax.
- Examples
- Uses GKE on AWS provisioning, Terraform-generated infrastructure, AWS node pools, management services, and repository-based configuration changes.
- What you can do after
- Apply it via Terraform or Pulumi to define, version, provision, and manage infrastructure changes systematically.
Read how Google Anthos in Action explains infrastructure as code →
Spring Microservices in Action
The practice of defining and managing infrastructure provisioning through executable, version-controlled code.
- How it is used
- Uses source-controlled provisioning scripts to create the machine image carrying a microservice through the deployment pipeline.
- How deep it goes
- Details scripts run during each build and prohibits post-build server changes, without naming specific provisioning tools.
- Examples
- Shows provisioning a machine image with an installed microservice and deploying them together between environments.
- What you can do after
- Understand how source-controlled provisioning scripts make server configuration repeatable and limit configuration drift.
Read how Spring Microservices in Action explains infrastructure as code →
Write Powerful Rust Macros
Infrastructure as code is the practice of defining and managing computing infrastructure through executable code or declarative machine-readable configuration.
- How it is used
- Defines application infrastructure as executable code or machine-readable text for repeatable creation, destruction, updating, and reproduction.
- How deep it goes
- Explains IaC benefits, AWS tooling, custom syntax parsing, macro composition, and asynchronous resource creation without detailing deployment operations.
- Examples
- Uses CloudFormation templates, AWS CDK definitions, and a Rust macro that parses infrastructure syntax and creates AWS resources.
- What you can do after
- Build it from scratch by designing a Rust infrastructure DSL that parses declarations and invokes asynchronous AWS SDK operations.
Read how Write Powerful Rust Macros explains infrastructure as code →
Kafka for Architects
Infrastructure as code is the practice of defining and managing infrastructure through machine-readable declarative or procedural files.
- How it is used
- Manages Kafka infrastructure and configuration through version-controlled desired state and automated reconciliation.
- How deep it goes
- Explains reconciliation, tooling alternatives, and governance, but stops short of low-level implementation walkthroughs.
- Examples
- Uses Strimzi, Confluent for Kubernetes, Ansible, Puppet, Terraform, and pull-request approval workflows.
- What you can do after
- Operate/configure Kafka resources reproducibly with GitOps, Kubernetes operators, Ansible, Puppet, or Terraform.
Read how Kafka for Architects explains infrastructure as code →
Secure APIs
Infrastructure as code is the management of infrastructure through machine-readable code rather than exclusively through manual configuration.
- How it is used
- Standardizes infrastructure deployment and supports secure, repeatable API environments.
- How deep it goes
- Explains automation, tool choices, static analysis, and deployment checks, but does not detail IaC syntax.
- Examples
- Uses CloudFormation, Azure Resource Manager, Cloud Builder, Terraform, tfsec, and deployment smoke tests.
- What you can do after
- Operate and configure infrastructure consistently, then audit and test it for common security misconfigurations.
Also covered in
- Simple Object-Oriented Design: Create clean, maintainable applications
- Shipping Go: Develop, deliver, discuss, design, and go again
- Practical Automation with PowerShell: Effective scripting from the console to the cloud
- Road to Kubernetes
- Building Distributed Applications that Work
- Apache Kafka in Action
- Architecture Modernization: Socio-technical alignment of software, strategy, and structure
- Logs and Telemetry
What to know first
- software testingSoftware testing is the systematic evaluation of software under specified inputs or conditions to assess its behavior against expected results or requirements and identify defects.
- YAMLYAML is a human-readable data serialization standard for representing structured data, commonly using indentation to express mappings and sequences.
- deployment pipelineA deployment pipeline is a repeatable sequence of stages that builds, tests or validates, packages, and delivers software changes toward release or deployment.
- infrastructureInfrastructure is the foundational physical, digital, and operational resources and systems that support the operation of organizations, computing systems, or services.
Related concepts
- Terraformimplemented by · Terraform is an infrastructure-as-code tool for declaratively defining, provisioning, and managing infrastructure resources across providers.
- ClickOpscontrasts with · ClickOps is the manual management of infrastructure through graphical or web-based interfaces instead of reproducible, declarative automation.
- versioninguses · Versioning is the practice of assigning or maintaining identifiable revisions of artifacts over time so their changes, histories, or compatibility can be tracked.
- Ansibleincludes · Ansible is an open-source automation tool for configuring systems, deploying applications, and orchestrating tasks across managed hosts.
- declarative programmingused by · Declarative programming is a programming paradigm that specifies desired results, states, or relationships without prescribing the step-by-step procedure to achieve them.
- gituses · Git is a distributed version-control system for recording changes to files and coordinating work across repositories.
Questions about infrastructure as code
What is infrastructure as code?
Infrastructure as code is the practice of defining, provisioning, and managing computing infrastructure through machine-readable code or configuration rather than manual procedures.
Which Manning books explain infrastructure as code?
Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform, Grokking Software Architecture, Effective Platform Engineering, Acing the CCNA Exam: Volume 2 Advanced Networking and Security, Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform, Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu, Azure Security, AI-Powered Developer: Build software with ChatGPT and Copilot and 9 more.
What should I know before learning infrastructure as code?
Manning books that teach infrastructure as code usually introduce software testing, YAML, deployment pipeline and infrastructure first.
What is the difference between infrastructure as code and ClickOps?
Infrastructure as code is the practice of defining, provisioning, and managing computing infrastructure through machine-readable code or configuration rather than manual procedures. ClickOps is the manual management of infrastructure through graphical or web-based interfaces instead of reproducible, declarative automation.
What kinds of infrastructure as code are there?
Kinds of infrastructure as code include Ansible.
What is infrastructure as code also called?
Infrastructure as code is also called IaC or infrastructure code.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
















