CompTIA Cloud+ (CV0-004)DevOps FundamentalsHard

A configuration management tool allows an administrator to specify that a web server package 'must be installed and the service must be running,' without writing the individual step-by-step commands needed to achieve that outcome. Which automation approach does this represent?

  1. AEvent-driven automation
  2. BImperative automation
  3. CDeclarative automation
  4. DAd hoc scripting
Show answer & explanation

Correct answer: C. Declarative automation

Declarative automation describes the desired end state, leaving the tool to determine the steps required to reach it. Imperative automation, by contrast, requires specifying the exact sequence of commands to execute, which is not the case in this scenario.

Why the other options are wrong

  • A. Event-driven automation triggers actions in response to specific events, not simply defining a target state.
  • B. Imperative automation requires specifying exact commands and steps, the opposite of what's described.
  • D. Ad hoc scripting refers to one-off, manually run scripts, not a structured desired-state definition.

Declarative Automation

An automation approach where the desired end state is specified, and the tool determines the steps needed to achieve and maintain that state.

  • Contrasts with imperative automation's step-by-step commands
  • Used by tools like Puppet, Terraform, and Kubernetes manifests
  • Simplifies maintaining consistent, repeatable configurations

Memory trick: Declarative is telling a GPS your destination; imperative is reciting every turn yourself.

More DevOps Fundamentals questions