formula-vault/vault/files/config.hcl

36 lines
994 B
HCL
Raw Normal View History

2018-05-15 02:36:50 -04:00
listener "{{ config.listen_protocol }}" {
address = "{{ config.listen_address }}:{{ config.listen_port }}"
tls_disable = {{ config.tls_disable }}
{%- if self_signed_cert.enabled %}
tls_cert_file = "/etc/vault/{{ self_signed_cert.hostname }}.pem"
tls_key_file = "/etc/vault/{{ self_signed_cert.hostname }}-nopass.key"
{% else -%}
2018-05-15 02:36:50 -04:00
{%- if config.tls_cert_file %}
tls_cert_file = "{{ config.tls_cert_file }}"
{% endif -%}
2018-05-15 02:36:50 -04:00
{%- if config.tls_key_file %}
tls_key_file = "{{ config.tls_key_file }}"
{% endif -%}
2018-05-15 02:39:49 -04:00
{% endif -%}
}
2018-05-15 02:36:50 -04:00
{%- if config.backend and config.backend.type == "s3" %}
backend "s3" {
2018-05-15 02:36:50 -04:00
bucket = "{{ config.backend.bucket }}"
}
{% endif -%}
2018-05-15 02:36:50 -04:00
{%- if config.storage and config.storage.type == "consul" %}
storage "consul" {
2018-05-15 02:36:50 -04:00
address = "{{ config.storage.address }}"
path = "{{ config.storage.path }}"
}
{%- else %}
storage "file" {
2018-05-15 02:36:50 -04:00
path = "{{ config.data_dir }}"
}
2018-05-15 02:39:49 -04:00
{% endif %}
2018-05-15 02:36:50 -04:00
default_lease_ttl="{{ config.default_lease_ttl }}"
max_lease_ttl="{{ config.max_lease_ttl }}"