File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ locals {
36
36
dockerLabels = jsonencode (var. dockerLabels )
37
37
dockerSecurityOptions = jsonencode (var. dockerSecurityOptions )
38
38
entryPoint = jsonencode (var. entryPoint )
39
- environment = jsonencode (var. environment )
40
39
extraHosts = jsonencode (var. extraHosts )
41
40
41
+ environment = jsonencode (var. environment != {} ? [for k , v in var . environment : { " name" : k, " value" : v }] : [])
42
42
healthCheck = replace (jsonencode (var. healthCheck ), local. classes [" digit" ], " $1" )
43
43
44
44
links = jsonencode (var. links )
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ variable "entryPoint" {
49
49
}
50
50
51
51
variable "environment" {
52
- default = []
52
+ default = {}
53
53
description = " The environment variables to pass to a container"
54
- type = list ( map (string ) )
54
+ type = map (string )
55
55
}
56
56
57
57
variable "essential" {
You can’t perform that action at this time.
0 commit comments