Skip to content

Commit

Permalink
fix up ytt doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed Jan 29, 2020
1 parent 2ae07fe commit 2917037
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions docs/k14s_ytt.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,34 @@ k14s_ytt data source provides ability to template with ytt.

### Example

Use `values` for string values and `values_yaml` for non-string values.

```yaml
data "k14s_ytt" "tpl1" {
files = ["ytt-k8s"]
values_yaml = <<EOF
#@data/values
---
cm1: "cm1"
cm2: "cm3"
EOF

values = {
prop1 = "val1"
}

values_yaml = {
prop2 = true
prop3 = 156
}
}

output "result" {
value = "${data.k14s_ytt.tpl1.result}"
}
```

Use `config_yaml` to provide more complex data values

```yaml
data "k14s_ytt" "tpl1" {
files = ["ytt-k8s"]

values_yaml = <<EOF
config_yaml = <<EOF
#@data/values
---
cm1: "cm1"
Expand Down

0 comments on commit 2917037

Please sign in to comment.