formula-vault/vault/files/config.hcl

36 lines
997 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 }}"
2018-05-15 02:41:05 -04:00
{%- 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 }}"
}
2018-05-15 02:43:32 -04:00
{%- else -%}
storage "file" {
2018-05-15 02:36:50 -04:00
path = "{{ config.data_dir }}"
}
2018-05-15 02:45:25 -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 }}"