Templates
On this page, you can find Tower templates for different technologies
HashiCorp Consul®
If you want Tower to serve the configuration in a manner similar to HashiCorp's Consul, simply create a new endpoint with the following template:
[
{%- for var in variables -%}
{
"LockIndex": 0,
{% comment %}
Please customize the following line with the Base names that are relevant to your configuration.
{% endcomment -%}
"Key": "{{Technology}}/{{Environment}}/{{Application}}/{{var.name}}",
"Flags": 0,
{% case var.type -%}
{% when "string", "password" -%}
"Value":"{{ var.value | tower_toBase64 }}",
{% when "number", "boolean" -%}
"Value":"{{ var.value | tower_toBase64 }}",
{% when "list" -%}
{% assign insideList = var.value | join: "\",\"" -%}
{% assign l = "[\"" | concat: insideList | concat: "\"]" -%}
"Value": "{{l | tower_toBase64}}",
{% else -%}
"Value":"{{ var.value | tower_toBase64 }}",
{% endcase -%}
{% assign random = "" | tower_random -%}
"CreateIndex": "{{random}}",
"ModifyIndex": "{{random}}"
}{%- if forloop.last != true -%},{%- endif -%}
{%- endfor %}
]Spring Cloud Config Server
If you want Tower to serve the configuration in a manner similar to Spring Cloud Config Server, simply create a new endpoint with the following template:
Last updated