clc_load_balancer_pool

    0

    0

    lucycodes42

    Terraform snippets

    The code defines a resource named clc_load_balancer_pool, and specifies that it will be located in the myResourceName resource group. The description and data_center values will be used to populate the pool's description and location_id fields, respectively. The load_balancer field will point to a load_balancer_api resource, and the method and persistence fields will be set to roundRobin. The port field will be set to port 80. Finally, two nodes will be defined, with status set to enabled and privatePort set to 3000.

    Shortcut: tf_clc_load_balancer_pool

    resource "clc_load_balancer_pool" "${myResourceName}" {
       name = "my-${myResourceName}"
       description = "my-description-${myResourceName}"
       data_center = "\${clc_group.frontends.location_id}"
       load_balancer = "\${clc_load_balancer.api.id}"
       method = "roundRobin"
       persistence = "standard"
       port = 80
    
       nodes {
           status = "enabled"
           ipAddress = "\${clc_server.node.0.private_ip_address}"
           privatePort = 3000
       }
    
       nodes {
           status = "enabled"
           ipAddress = "\${clc_server.node.1.private_ip_address}"
           privatePort = 3000
       }
    }
    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.