File tree Expand file tree Collapse file tree 4 files changed +17
-15
lines changed
Expand file tree Collapse file tree 4 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ resource "docker_service" "vault-dev" {
99 args = [" server" ] # automatically loads mounted vault-config.hcl
1010
1111 env = {
12- VAULT_ADDR = " http://127.0.0.1:8200"
12+ VAULT_ADDR = " http://127.0.0.1:8200"
1313 VAULT_API_ADDR = " http://127.0.0.1:8200"
14- SKIP_SETCAP = true
14+ SKIP_SETCAP = true
1515 }
1616
1717 labels {
@@ -36,7 +36,7 @@ resource "docker_service" "vault-dev" {
3636
3737 labels {
3838 label = " traefik.http.routers.vault-dev.tls.certresolver"
39- value = " letsEncrypt"
39+ value = var . live_cert == false ? " letsEncryptStaging " : " letsEncrypt"
4040 }
4141
4242 configs {
Original file line number Diff line number Diff line change 11# Required variables
22variable "hostname" {
33 type = string
4- description = " Hostname for traefik route"
4+ description = " Hostname for Vault route."
5+ }
6+
7+ variable "live_cert" {
8+ type = bool
9+ description = " Deploy Vault with a production (live) or staging SSL certificate."
10+ default = false
511}
612
713# Optional variables
814variable "networks" {
9- type = list
15+ type = list ( string )
1016 description = " List of networks to connect Vault to."
1117 default = [" traefik" ]
1218}
Original file line number Diff line number Diff line change @@ -2,9 +2,5 @@ data "local_file" "vault_hcl" {
22 filename = " ${ path . module } /vault-config.hcl"
33}
44data "template_file" "vault_hcl" {
5- template = " ${ file (" ${ path . module } /vault-config.hcl" )} "
6-
7- # vars = {
8- # traefik_network = var.traefik_network
9- # }
5+ template = file (" ${ path . module } /vault-config.hcl" )
106}
Original file line number Diff line number Diff line change 11terraform {
2- required_providers {
3- docker = {
4- source = " terraform-providers/docker"
5- }
2+ required_providers {
3+ docker = {
4+ source = " kreuzwerker/docker"
65 }
7- required_version = " >= 0.13, <= 0.14"
6+ }
7+ required_version = " >= 0.13, <= 0.14"
88}
You can’t perform that action at this time.
0 commit comments