Skip to content

Instantly share code, notes, and snippets.

@dcanadillas
Last active July 15, 2020 15:42
Show Gist options
  • Save dcanadillas/0a4f987f825ef9674e527b6f89c215c9 to your computer and use it in GitHub Desktop.
Save dcanadillas/0a4f987f825ef9674e527b6f89c215c9 to your computer and use it in GitHub Desktop.
Vault config template for Terraform regarding Raft storage backend and replication resolver
cluster_name = "${clustername}-demo"
storage "raft" {
path = "/vault/data"
node_id = "${node_name}"
%{ for leader_host in hosts ~}
%{ if node_name != leader_host ~}
retry_join {
leader_api_addr = "http://${leader_host}:8200"
# leader_ca_cer_file = "/path/to/ca1"
# leader_client_cert_file = "/etc/vault.d/tls/vault.crt"
# leader_client_key_file = "/etc/ssl/certs/me.key"
}
%{ endif ~}
%{ endfor ~}
}
listener "tcp" {
address = "0.0.0.0:8200"
cluster_address = "0.0.0.0:8201"
tls_disable = ${tls_disable}
tls_cert_file = "/etc/vault.d/tls/vault.crt"
tls_key_file = "/etc/ssl/certs/me.key"
}
seal "azurekeyvault" {
tenant_id = "${tenant_id}"
client_id = "${client_id}"
client_secret = "${client_secret}"
vault_name = "${kmsvaultname}"
key_name = "${kmskeyname}"
enviroment = "AzurePublicCloud"
}
replication {
resolver_discover_servers = false
}
api_addr = "${http}://${public_ip}:8200"
cluster_addr = "${http}://${private_ip}:8201"
disable_mlock = true
ui = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment