not filling nodeport if the type is not nodeport
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ resource "kubernetes_service_v1" "automatic_service" {
|
||||
port = port.value
|
||||
target_port = port.value
|
||||
name = replace("${port.value}${each.key}", "/(.{0,15})(.*)/", "$1")
|
||||
node_port = port.value
|
||||
node_port = each.value.service_type == "NodePort" ? port.value : 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user