A command line utility on top of the tera templating engine. Takes json|yaml|toml as input and can merge ENV in. You may see it as envsubst on steroid.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Msg("Failed to render '__tera_one_off'"), source: Some(Error { kind: Msg("Forloop containers have to be an ident or a function call (tried to iterate on 'Math(MathExpr { lhs: Expr { val: Ident(\"audit\"), negated: false, filters: [] }, rhs: Expr { val: Ident(\"events\"), negated: false, filters: [] }, operator: Sub })')"), source: None }) }', src/main.rs:64:66
Remove - from audit-events and you will get
Thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Msg("Failed to render '__tera_one_off'"), source: Some(Error { kind: Msg("Tried to iterate using key value on variable `auditevents`, but it is missing a key"), source: None }) }', src/main.rs:64:66
It seems tera cannot handle YAML like
Result
Remove
-
fromaudit-events
and you will getCan one iterate over YAML map?