Using Basic Templates
Using templates to access Parameter values.
Templates allow you to transform your parameters and secrets into various required formats. Templates are created at an organization project scope allowing you to customize templates for your specific projects.

Creating a Template

Once you've created a set of parameters, you can begin refencing them inside your projects templates.
Select the designated project from the left hand menu and click Create New Template to open the Create Template dialogue.
Once the template is created, use the edit window to customize it. The templates format is user-defined. In this example, we're following a JSON format. Parameters are referenced by name within mustache notation.
The preview window will display the evaluated results, based upon the selected environment. You can validate your template by clicking Preview. Secrets are automatically hidden in templates and can be unmasked with the Show Secrets button.
Click Submit to save changes to the template.
Templates are now available to be referenced by your application with the CloudTruth CLI.

Automatic Parameters

In addition to your parameters, CloudTruth adds several automatic parameters that can be referenced in templates:
Automatic parameter name
Value
cloudtruth.project
The name of the current project.
cloudtruth.environment
The name of the current environment.
cloudtruth.template.<name>
evaluates template <name> against the current environment and includes its contents in this template.
CloudTruth will prevent you from creating a circular reference between templates (for example, template A references template B, template B references templates C, template C references template A). If you create one by mistake, we'll show the loop to you.

Template History

You can view the history of raw project templates in the history page. Selecting Templates will bring up a template list for your specified project.

Template History by Tag

You can select an environment tag to compare the projects current templates to and click Apply.
The table now displays a dropdown to show any differences in the templates for the current time compared to the templates content at the selected tag. Selecting the dropdown will bring up a side by side view of the template with highlighted differences.

History by date

You can select a date and approximate time to compare the projects current templates to and click Apply.
The table now displays a dropdown to show any differences in the templates for the current time compared to the templates content at the selected time. Selecting the dropdown will bring up a side by side view of the template with highlighted differences.
Last modified 10d ago