Skip to main content

2. The CLI workflow: init, plan, apply, destroy

Hands-on with the core loop. First real apply against the lab.

⏱ ≈ 20 min this module · 📚 ≈ 5.8 h full track

🔒 Unlock this course to read the material and run the labs.

See options to unlock →
🔒 The written material unlocks with the course.
🧪 Hands-on lab Easy · 120 XP · 20min

Goal

Write Terraform HCL in main.tf that creates an S3 bucket named certland-labs-tf with versioning enabled, then run terraform init && terraform apply -auto-approve.

Requirements

  • An aws_s3_bucket resource with bucket = certland-labs-tf
  • Versioning enabled (via aws_s3_bucket_versioning, status Enabled)

You do not need to configure the provider endpoint — the workspace already points the AWS provider at the lab environment. Just write pure HCL as you would against real AWS.

🔒 Unlock the course to run this lab.