imperative

A style where you list the exact steps to run, in order, like a recipe.

In more detail

Running an imperative script performs its steps again, whatever already exists. Run a script that creates a network twice and you may end up with two networks, because nothing in it checks first. Declarative tools avoid this by comparing a description with reality before acting.

Example

In Terraform: A script is imperative: running it performs its steps again, whatever already exists. Run a script that creates a network twice and you may end up with two networks, because nothing in it checks first. Declarative tools such as Terraform avoid this by comparing a description with reality before acting.

Related terms

Taught in

References

Certification courses