adding the command support
This commit is contained in:
@@ -34,8 +34,7 @@ variable "kubernetes" {
|
||||
replicas = optional(number, 1)
|
||||
namespace = optional(string)
|
||||
connected_namespace = optional(string, "")
|
||||
# namespace = optional(string,coalesce(connected_namespace,""))
|
||||
#block_namespace_creation = optional(bool, false)
|
||||
command = optional(list(string))
|
||||
service_port = optional(list(number))
|
||||
service_type = optional(string, "ClusterIP")
|
||||
service_name = optional(string)
|
||||
@@ -350,6 +349,20 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
}
|
||||
}
|
||||
|
||||
# dynamic "command" {
|
||||
# for_each = each.value.command != null ? [1] : []
|
||||
# content {
|
||||
# [each.value.command]
|
||||
# }
|
||||
|
||||
# }
|
||||
# command = each.value.command != null ? {
|
||||
# [each.value.command]
|
||||
# } : {}
|
||||
|
||||
|
||||
command = each.value.command != null ? each.value.command : []
|
||||
|
||||
|
||||
dynamic "env" {
|
||||
for_each = each.value.environment != null ? each.value.environment : {}
|
||||
@@ -465,9 +478,9 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
}
|
||||
|
||||
dynamic "secret" {
|
||||
for_each = volume.value.secret != null ? [1] : []
|
||||
for_each = volume.value.secret ? [1] : []
|
||||
content {
|
||||
secret_name = volume.value.secret
|
||||
secret_name = volume.value.name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user