0
0
llucycodes42
The code defines two ports, one for ICMP and one for TCP. It also defines a couple of source restrictions, one for the IP address range of the server and another for the CIDR range of the server.
Shortcut: tf_clc_public_ip
resource "clc_public_ip" "${myResourceName}" {
name = "my-${myResourceName}"
description = "my-description-${myResourceName}"
server_id = "\${clc_server.node.0.id}"
internal_ip_address = "${clc_server.node.0.private_ip_address}"
ports {
protocol = "ICMP"
port = -1
}
ports {
protocol = "TCP"
port = 22
}
ports {
protocol = "TCP"
port = 2000
port_to = 9000
}
source_restrictions {
cidr = "85.39.22.15/30"
}
}