← IaC Academy

Reusable projects · 21 / 23

Give resources a module boundary

Build a reusable team module with a required typed input and explicit output.

YOUR TASK

Make this happen

3 steps
  1. Pass Fulfillment through the name input.

  2. Keep the module marker and the identity<team> output.

  3. Check and simulate the module’s team.

Read the starter files

main.cococo

module "dispatch" {
  source = "./modules/team"
  inputs = { name = "TODO" }
}

modules/team/cococo.module.toml

format = 1

modules/team/main.cococo

input "name" { type = "string" }
team "this" {
  name = input.name
  description = "Ships customer orders"
}
output "id" {
  type = "identity<team>"
  value = team.this.id
}