Skip to content
Go back

Yaml

Two Flavors

Yamls can be either list or map types.

Map Example

user:
  name: "John Doe"
  age: 30
  location: "New York"

You can see how it is useful for maps to define configurations.

List Example

fruits:
  - Apple
  - Banana
  - Orange

tasks:
  - description: Buy groceries
    priority: high
  - description: Finish report
    priority: medium

You can see for sequences such as CD/CI pipelines this is very useful.

Last Notes

A general rule is that list YAML for ordered, anonymous, and repeated things Anonymous meaning you will likely never care to search by some meaningful id for it. Map YAML is for named configuration objects.


Share this post on:

Previous Post
Terraform Quick Notes
Next Post
DNS Records