Database DevOps Engineer · Module 4

Infrastructure as Code with Terraform

Build database servers and cloud databases from code with Terraform: what it is and its benefits for DBAs, the language, the core init, validate, plan, and apply workflow, state and drift, environments and modules, and keeping databases safe.

Beginner 6 lessons About 24 min of reading Free
Lessons

Work through them in order.

Each lesson builds on the one before it.

  1. What Is Terraform

    Picking up from Automation: what Terraform is, how it works with providers and state, its core benefits for DBAs, and what DBAs manage with it.

    5 sections4 min read
  2. The Terraform Language

    HCL blocks, providers, resources, data sources, variables, and outputs, with a complete Autonomous Database example.

    4 sections4 min read
  3. The Core Terraform Workflow

    init, validate, plan, and apply in detail, reading a plan's symbols, destroying safely, and other useful commands.

    9 sections5 min read
  4. State and Drift Detection

    What state is, remote backends and locking, detecting and fixing drift, and importing existing databases.

    5 sections4 min read
  5. Environments and Modules

    Multi-environment parity with modules: one standard design, different settings per environment, and where modules come from.

    6 sections3 min read
  6. Terraform for Databases

    Protecting databases from destruction, spotting replacements, keeping secrets out, what Terraform should manage, and running it through a pipeline.

    8 sections4 min read