Course contentsShow
← Software Engineering
Lesson 1495 of 1,93343. Infrastructure as CodeFree lesson

Configuration Management vs Infrastructure Provisioning

Understanding when to use configuration management tools versus infrastructure provisioning tools like Terraform.

Configuration Management vs Infrastructure Provisioning

You'll learn: How to distinguish between configuration management and infrastructure provisioning, and when to use each approach.

The Core Distinction

Think of infrastructure provisioning as building the house — creating servers, networks, databases, and storage. Configuration management is furnishing and maintaining the house — installing software, updating settings, and keeping everything running smoothly over time.

Infrastructure provisioning tools (like Terraform, CloudFormation, or Pulumi) excel at creating and destroying cloud resources. They manage the lifecycle of infrastructure components themselves: VMs, load balancers, VPCs, IAM roles. They're designed to be declarative and maintain state about what resources exist.

Configuration management tools (like Ansible, Chef, or Puppet) excel at managing what runs on existing infrastructure. They install packages, configure applications, manage users, update files, and enforce desired system states. They're designed for ongoing maintenance and drift correction.

When to Use Which

Use provisioning tools when you need to:

  • Create new cloud resources (servers, networks, databases)
  • Define infrastructure dependencies
  • Manage resource lifecycle (create, update, destroy)
  • Work with cloud provider APIs

Use configuration management when you need to:

  • Install and configure software on existing servers
  • Manage application settings and files
  • Enforce compliance policies
  • Handle ongoing configuration updates

The Modern Pattern

In practice, you often use both together: Terraform provisions a server, then hands off to Ansible to configure the software running on it. With immutable infrastructure patterns, you might bake configuration into machine images, reducing the need for post-provisioning configuration management.

Key Takeaway: Infrastructure provisioning creates the resources; configuration management manages what runs on them. Modern DevOps often uses provisioning tools for immutable infrastructure and minimizes post-deploy configuration.