Skip to content

Commit f7bc1f4

Browse files
committed
Provide ability to configure missing mysql storage options
As documented in https://developer.hashicorp.com/vault/docs/configuration/storage/mysql plaintext_connection_allowed, ha_enabled and lock_table were missing.
1 parent 9a10574 commit f7bc1f4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ vault_mysql_tls_ca_file: ""
206206
vault_mysql_max_parallel: ""
207207
vault_mysql_max_idle_connections: ""
208208
vault_mysql_max_connection_lifetime: ""
209+
vault_mysql_plaintext_connection_allowed: ""
210+
vault_mysql_ha_enabled: false
211+
vault_mysql_lock_table: ""
209212

210213
# gcs storage settings
211214
vault_gcs_bucket: ""

templates/vault_backend_mysql.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,13 @@ storage "mysql" {
2222
{% if vault_mysql_max_connection_lifetime is defined and vault_mysql_max_connection_lifetime|length -%}
2323
max_connection_lifetime = "{{ vault_mysql_max_connection_lifetime }}"
2424
{% endif -%}
25+
{% if vault_mysql_plaintext_connection_allowed is defined and vault_mysql_plaintext_connection_allowed|length -%}
26+
plaintext_connection_allowed = "{{ vault_mysql_plaintext_connection_allowed }}"
27+
{% endif -%}
28+
{% if vault_mysql_ha_enabled is defined and vault_mysql_ha_enabled|bool -%}
29+
ha_enabled = "{{ vault_mysql_ha_enabled | bool | lower }}"
30+
{% endif -%}
31+
{% if vault_mysql_lock_table is defined and vault_mysql_lock_table|length -%}
32+
lock_table = "{{ vault_mysql_lock_table }}"
33+
{% endif -%}
2534
}

0 commit comments

Comments
 (0)