clc_public_ip

    0

    0

    lucycodes42

    Terraform snippets

    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"
       }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.