Reusable projects · 23 / 23
Assemble a reusable team project
Combine defaults, module inputs, confined files, typed outputs and user references in one working stack.
YOUR TASK
Make this happen
Set team_name to
Fulfillment.Use the module’s own
purpose.txtfile for its description.Connect Alice through module.dispatch.id; check, inspect and simulate.
Read the starter files
main.cococo
variable "team_name" { default = "TODO" }
module "dispatch" {
source = "./modules/team"
inputs = { name = var.team_name }
}
team_membership "alice" {
teamId = module.dispatch.id
userId = user.alice.id
}
modules/team/cococo.module.toml
format = 1
modules/team/main.cococo
input "name" { type = "string" }
team "this" {
name = input.name
description = file("purpose.txt")
}
output "id" {
type = "identity<team>"
value = team.this.id
}
people.cococo
user "alice" {
email = "alice@example.com"
}
modules/team/purpose.txt
TODO