One of the decisions that needs to be made to leverage IaC is whether to make changes to your environment with imperative or declarative automation. Most IaC is declarative in nature. Here’s a simple way to look at it: imperative vs. declarative is the difference between how the program should operate vs. what the program needs to accomplish.
To make imperative automation changes to your infrastructure, you might use a Command Line Interface (CLI). It directs changes to the cloud first within a container, then virtual machine (VM), and then virtual private cloud, in order, through a script. This is a detailed checklist, but if the configuration needs to be changed after the push to multiple machines, the steps and the script would have to be redone.
A declarative automation approach requires goal creation. For example, rather than using the CLI and listing the exact step-by-step configuration for a VM, you’d simply state that you want a VM with, say, a domain attached, and then let the automation take over. The declarative approach enables you to more easily state what needs to be accomplished by the automation tools.