10.4.1: Infrastructure as Code (Provisioning Tools)

Introduction to Cloud Computing · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    10.4.1: Infrastructure as Code (Provisioning Tools)

    Infrastructure as Code (IaC) means managing infrastructure through machine-readable definition files, rather than manual setup or point-and-click consoles. With IaC, you declare the desired state of your infrastructure (networks, servers, databases, etc.), and automation tools create and update resources to match that state. This approach brings the benefits of software development to infrastructure: version control, code review, testing, and repeatability. Two widely used IaC tools are HashiCorp Terraform and AWS CloudFormation. Terraform is a popular open-source tool that supports multiple cloud providers. It uses a declarative language (HCL – HashiCorp Configuration Language) to define resources. One of Terraform’s key advantages is multi-cloud support – with one configuration, it can provision across AWS, Azure, GCP, and more. Teams can create modular templates and reuse them, and Terraform’s state management allows tracking of existing resources to compute incremental changes. On the other hand, AWS CloudFormation is a native IaC service for AWS, using YAML/JSON templates to describe AWS resources. CloudFormation is tightly integrated into the AWS ecosystem (supporting practically all AWS services as resource types) and can interface with AWS Identity and Access Management (IAM) for deployment permissions. A team operating purely within AWS might choose CloudFormation for its deep integration (and it’s offered as a managed service), whereas a team aiming for cloud-agnostic deployments might prefer Terraform. Both tools follow a declarative model: you specify what infrastructure you want, and the tool figures out how to create or update it. For example, a CloudFormation template can define a multi-tier application – an AWS VPC, some subnets, an auto-scaling EC2 group, load balancer, and RDS database – and with one action, create that stack consistently. The benefits of IaC are immense: consistency (the same template deploys identical environments for dev/test/prod), repeatability (you can destroy and recreate environments reliably), and reduced configuration drift (changes go through code, so you avoid undocumented ad-hoc tweaks). IaC also enables CI/CD for infrastructure – changes to infrastructure definitions can be tested and rolled out just like application code, which is a cornerstone of DevOps. Other notable IaC tools include Azure Resource Manager (ARM) Templates or Bicep for Azure, Google Cloud Deployment Manager for GCP, and Pulumi (which lets you use general-purpose languages for IaC). Regardless of the specific tool, adopting IaC is considered a best practice for cloud projects because it ensures that your infrastructure setup is documented, reproducible, and part of the project’s source code.
    Infrastructure as Code (IaC) Workflow. Details in caption.

    Figure \(\PageIndex{1}\): This flowchart shows the IaC lifecycle from writing declarative configuration files through version control, planning, and automated provisioning to the running cloud infrastructure. (CC BY 4.0; Felix Amoruwa) Access to a detailed description of Figure \(\PageIndex{1}\)

    This page titled 10.4.1: Infrastructure as Code (Provisioning Tools) was last modified on Tue, 22 Sep 2026 21:13:46 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Felix Amoruwa.