Learn Everything

Paths/DevOps Engineer/Terraform / Modules

Practice Taskintermediateterraform 1.7Ask AI

Wire Up a Bucket Module

Copy-pasted .tf files do not scale — teams package resources into modules and call them once per environment. Lay out a bucket module, wire the root configuration that calls it, then init and apply so the bucket lands in state.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • Directory ~/tf-modules/modules/s3 contains the module's main.tf○
  • Root main.tf in ~/tf-modules declares the module call○
  • aws_s3_bucket.reports is in the terraform state of ~/tf-modules○

02Walkthrough

1 of 9 revealed
  1. 01

    Create the module layout

    Convention — modules live under modules/<name> inside the repo. mkdir creates every missing parent, so one command builds ~/tf-modules/modules/s3.

    mkdir ~/tf-modules/modules/s3
  2. 8 locked · each failed submit reveals one

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — terraform 1.7

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list