resource "alicloud_security_group" "default" { name = "${var.security_group_name}" } resource "alicloud_security_group_rule" "http-in" { type = "ingress" ip_protocol = "tcp" nic_type = "internet" policy = "accept" port_range = "80/80" priority = 1 security_group_id = "${alicloud_security_group.default.id}" cidr_ip = "0.0.0.0/0" } resource "alicloud_security_group_rule" "ssh-in" { type = "ingress" ip_protocol = "tcp" nic_type = "internet" policy = "accept" port_range = "22/22" priority = 1 security_group_id = "${alicloud_security_group.default.id}" cidr_ip = "0.0.0.0/0" }