← IaC Academy

Files and artifacts · 15 / 23

Use YAML-compatible artifacts

Serialize a structured value with yamlencode and preserve its types.

YOUR TASK

Make this happen

3 steps
  1. Set enabled to true and retries to 3.

  2. Keep yamlencode followed by source for the text field.

  3. Observe that the encoder’s JSON syntax is also valid YAML.

Read the starter files

main.cococo

team "fulfillment" {
  name = "Fulfillment"
  description = source(yamlencode({
    retries = number("4")
    enabled = bool("true")
    tags = ["packing", "shipping"]
    "display-name" = "Fulfillment"
  }))
}