cloudstack_security_group_rule

    0

    0

    lucycodes42

    Terraform snippets

    This code defines two security group rules. The first rule is configured to allow traffic destined for addresses within the 192.168.0.0/24 and 192.168.1.0/25 subnets to pass through the security group. The second rule is configured to allow TCP traffic to port 80 and 443 to pass through the security group.

    Shortcut: tf_cloudstack_security_group_rule

    resource "cloudstack_security_group_rule" "${myResourceName}" {
       security_group_id = "e340b62b-fbc2-4081-8f67-e40455c44bce"
    
       rule {
           cidr_list = ["0.0.0.0/0"]
           protocol  = "tcp"
           ports     = ["80", "443"]
       }
    
       rule {
           cidr_list                = ["192.168.0.0/24", "192.168.1.0/25"]
           protocol                 = "tcp"
           ports                    = ["80-90", "443"]
           traffic_type             = "egress"
           user_security_group_list = ["group01", "group02"]
       }
    }
    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.