Commit f97500ea by chenxx

update main.tf port

1 parent ca568e88
Showing 1 changed file with 28 additions and 7 deletions
...@@ -57,15 +57,36 @@ resource "kubernetes_service" "CUS" { ...@@ -57,15 +57,36 @@ resource "kubernetes_service" "CUS" {
} }
type = "NodePort" type = "NodePort"
ports = [
for p in var.ports :
{ # port = [for p in var.ports:
port = "${p}" # {
name = "port-${p}" # port = "${p}"
# name = "port-${p}"
# protocol = "TCP"
# target_port = "${p}"
# }]
# port {
#
# }
port {
port = "80"
name = "port-80"
protocol = "TCP"
target_port = "80"
node_port = "30088"
}
port {
port = "443"
name = "port-443"
protocol = "TCP" protocol = "TCP"
target_port = "${p}" target_port = "443"
node_port = "30089"
} }
]
# #
# port { # port {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!