Introduction to YAML
YAML and JSON are the languages you can use for CloudFormation.
JSON is horrible for CF
-
YAML is a human-readable data-serialization language (Wikipedia)
-
It is perfect for DevOps to create input files to manage objects into different systems like Kubernetes and Ansible
-
It uses indentation to identify relations
-
When combined with Github, its an excellent way to manage and update configurations in a structured way
-
YAML is great in so many ways
-
Key value Pairs
-
Nested objects
-
Support Arrays (also called group and defined by
-
) -
Multi line strings
Example -
invoice:
date: 2001-01-23
bill-to:
given: Chris
family: Duma
address:
street: 458 Walkman Dr.
suite: Suite #292
city: Royal Oak
state: MI
postal: 48046
lines:
- product:
sku: BL394D
description: Basketball
quantity: 4
price: 450.00
- product:
sku: BL4438H
description: Super Hoop
quantity: 1
price: 2392.00