File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,15 @@ resource "kubernetes_deployment" "deployment" {
7171 path = var. healthcheck_path
7272 port = 80
7373
74+ dynamic "httpHeaders" {
75+ for_each = var. healthcheck_headers
76+ iterator = header
77+ content {
78+ name = header. value [" name" ]
79+ value = header. value [" value" ]
80+ }
81+ }
82+
7483 }
7584 period_seconds = 10
7685 initial_delay_seconds = 15
Original file line number Diff line number Diff line change 3333 type = string
3434}
3535
36+ variable "healthcheck_headers" {
37+ type = list (object ({
38+ name = string
39+ value = string
40+ }))
41+ default = []
42+ description = << EOT
43+ HTTP headers to be set on healthcheck requests.
44+ See https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#http-probes
45+ for documentation, including the default headers.
46+ EOT
47+ }
48+
3649variable "env_vars" {
3750 type = list (object ({
3851 name = string
You can’t perform that action at this time.
0 commit comments