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.
Work through them in order.
Each lesson builds on the one before it.
-
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.
-
The Terraform Language
HCL blocks, providers, resources, data sources, variables, and outputs, with a complete Autonomous Database example.
-
The Core Terraform Workflow
init, validate, plan, and apply in detail, reading a plan's symbols, destroying safely, and other useful commands.
-
State and Drift Detection
What state is, remote backends and locking, detecting and fixing drift, and importing existing databases.
-
Environments and Modules
Multi-environment parity with modules: one standard design, different settings per environment, and where modules come from.
-
Terraform for Databases
Protecting databases from destruction, spotting replacements, keeping secrets out, what Terraform should manage, and running it through a pipeline.