Skip to content

Commit

Permalink
etcd: allow dynamic pass (#2332)
Browse files Browse the repository at this point in the history
Signed-off-by: Furkan Türkal <[email protected]>
Co-authored-by: Batuhan <[email protected]>
  • Loading branch information
Dentrax and developer-guy authored Mar 9, 2024
1 parent 38cca85 commit c18e72f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions images/etcd/config/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ variable "extra_packages" {
default = ["etcd"]
}

variable "environment" {
description = "Additional environment variables to set in the image."
type = map(string)
default = {}
}

module "accts" { source = "../../../tflib/accts" }

output "config" {
Expand All @@ -22,8 +28,8 @@ output "config" {
gid = 65532
permissions = 493 // 0o755 (HCL explicitly does not support octal literals)
}]
environment = {
"ETCD_DATA_DIR" = "/var/lib/etcd"
}
environment = merge(var.environment, {
"ETCD_DATA_DIR" : "/var/lib/etcd",
})
})
}

0 comments on commit c18e72f

Please sign in to comment.