What is the difference between declarative and imperative infrastructure tools?
BeginnerConceptIaC and Terraform Fundamentals
Answer
Declarative tools (Terraform, CloudFormation) describe the desired end state and the tool works out the steps. Imperative tools (shell scripts, AWS CLI, many Ansible playbooks) describe the steps to run in order. Declarative is easier to re-run safely because the tool diffs desired against actual; imperative gives more control but you own idempotency yourself.
More on IaC and Terraform Fundamentals
What is Infrastructure as Code and why do teams use it?BeginnerWhat is Terraform and what problem does it solve?BeginnerWhat is HCL and can Terraform use anything else?BeginnerWhich files make up a typical Terraform root module?BeginnerHow does Terraform work internally?AdvancedWhat is a provider in Terraform?Beginner