20.25. kb-00024: How Can I manipulate values during Golang Template rendering?

20.25.1. Knowledge Base Article: kb-00024

20.25.2. Description

20.25.3. Solution

The Digital Rebar Provision integrates most of the Sprig Function Library in the Golang Template rendering operations. That means that you may include their string, math and flow functions into your pipelines.

Some simple examples:

{{.Param "noCamelCase/hashiCorp" | snakecase }}

# or
{{.Param "cool/tech" | regexMatch "([DRP]*)"}}

Please consult the Sprig Function Library for a full list of functions.


Digital Rebar Provision blocks functions that could be used to operate on the endpoint outside of DRP template rendering for security reasons.

20.25.4. Additional Information

Additional resources and information related to this Knowledge Base article. See Also Versions

v4.0 and newer Keywords

sprig, advanced templating, templates, content Revision Information

KB Article     :  kb-00024
initial release:  Wed Jun 10 11:59:35 PDT 2020
updated release:  Wed Jun 10 11:59:35 PDT 2020