DevOps module 04

Infrastructure changes need evidence.

Terraform is valuable when state, review, policy and lifecycle discipline are treated as first-class controls.

01

Write

Declare providers, resources, data sources, variables, outputs and module boundaries.

02

Init

Download providers, initialise the backend and validate dependency locks.

03

Plan

Review the exact proposed change, replacements, deletions and unknown values.

04

Apply

Execute an approved plan with controlled credentials and auditable output.

05

State

Protect remote state with locking, encryption, access control and recovery.

06

Operate

Detect drift, upgrade providers carefully and refactor without recreating resources.

Production rules

Remote state

Never rely on an engineer's laptop as the production source of truth.

Plan review

Require peer review for destructive and replacement operations.

Separate environments

Keep clear state boundaries and credentials for development, test and production.

No manual drift

Import legitimate resources or revert unapproved console changes.