DevOps Practitioner · Module 4: Infrastructure as Code · Lab
Plan, Apply and Destroy with Local Resources
45 min hands-on · Core
A local machine with OpenTofu or Terraform installed; local providers only (files, null or local containers). No cloud credentials anywhere.
Local guide: run the steps below on your own machine in order, then check the validation list.
Objectives
- Run the full loop on local fixtures and read each plan
- Destroy cleanly and show nothing orphaned
- Write the honesty limit into the record
Step 1
Build the fixture
Write a configuration managing two local resources (a generated file and a local container or null resource with a trigger). Plan, quote the two creations, and apply.
Step 2
Change and destroy
Edit one attribute, plan the in-place change and apply. Then plan the destroy, quote what will be removed, apply it, and verify nothing remains (no files, no containers, state empty).
Step 3
Write the limit
Add one paragraph: which habits this proved (loop, reading plans, clean destroy) and what it proved nothing about (cloud IAM, networking, bills, provider quirks).
How to confirm it worked
- Each plan quoted before its apply
- Destroy verified complete with no leftovers
- Honesty paragraph present and accurate