Modules and environments
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
structure configuration for reuse.
Planned topics
- A module is a reusable group of resources with inputs and outputs (for example
network,database). - Separate environments (dev, staging, prod) with separate state; reuse the same modules with different variables.
- Avoid one giant root module; split by lifecycle and ownership.
- Version modules and keep their interfaces small.
Draft outline details
Demonstration
layout: modules/network, modules/database, envs/dev, envs/prod, each env calling the modules.
Check your understanding
Why separate state per environment?
Show answer
A mistake in dev cannot affect production, and blast radius stays small.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.