Skip main navigation

Database as Code


Infrastructure as Code (IaC) and configuration as code are not mutually exclusive processes. Instead, the two processes complement each other and can be used in tandem.

The term configuration as code is not used as widely, and in some cases, IaC is used to describe both provisioning and configuring machines. Infrastructure as Code can also be configuration as code but usually not vice versa.

If you do use the two processes separately, a simple principle to keep in mind is that Infrastructure of Code refers to creating and provisioning machines, whereas configuration as code refers to configuring components and software on the machines (such opening ports and installing software).

There are two types of approaches to Infrastructure as Code:

declarative (functional) and imperative (procedural). The declarative approach states what the final state should be. When run, the script or definition will initialise or configure the machine to have the finished state that was declared. In the imperative approach, the script states the how for the final state of the machine by executing through the steps in order to get to the finished state.

There are two configuration methods in IaC:

Push – in the push method, the controlling or master server will push the configuration to the target machines.

Pull – in the pull method, the machines configured will pull the configuration from a controlling server, such as a master server.

Some organisations may benefit from Infrastructure as Code frameworks such as Windows PowerShell Desired-State Configuration (DSC).

This article is from the free online

Microsoft Future Ready: Fundamentals of DevOps and Azure Pipeline

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now