0
0
llucycodes42
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"]
}
}