StaffCoder
Terraform
TerraformTerraform 1.15Linux CLI
21 modules · 84 challengesSign up
Modules21 modules · 84 challenges
Work with module interfaces to add optional defaulted inputs, validate the contract across variables, and chain modules with for_each. Finish by building a production module library.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Optional and Defaulted Interfaces

Sign up to unlock
—No data yetmedium
About this challenge

Declare a module interface with optional object attributes, defaults and nullability, so minimal calls apply with defaults, full calls override and null behaves as declared.

Solved in a browser IDE and graded by tests. Sign up to solve

Validating the Contract

Sign up to unlock
—No data yetmedium
About this challenge

Encode a module's contract as input validations, including a cross-variable rule, so invalid calls fail at plan with messages that name the violated rule.

Solved in a browser IDE and graded by tests. Sign up to solve

Composition Patterns

Sign up to unlock
—No data yetmedium
About this challenge

Fan a module out with for_each per collection key and chain a second module from its outputs, so key removal touches one instance and upstream changes propagate downstream.

Solved in a browser IDE and graded by tests. Sign up to solve

Production Module Library

STAR
Solving it completes the module
—No data yetmedium
About this challenge

Build a queue module with optional defaulted inputs and a validated contract, then a consumer that fans it out from data and chains it into a registry, proven from empty state to a clean re-plan.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.