Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Infastructure as Code (IaC)

Infrastructure as code is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.

IaC can be a key attribute of enabling best practices in [devops] – Developers become more involved in defining configuration and Ops teams get involved earlier in the development process.

There are generally two approaches to IaC: [declarative-programming] (functional) vs. [imperative-programming] (procedural). The difference between the declarative and the imperative approach is essentially ‘what’ versus ‘how’ . The declarative approach focuses on what the eventual target configuration should be; the imperative focuses on how the infrastructure is to be changed to meet this. The declarative approach defines the desired state and the system executes what needs to happen to achieve that desired state. Imperative defines specific commands that need to be executed in the appropriate order to end with the desired conclusion.