resource "openstack_networking_secgroup_v2" "ssh_ping" { name = "terratest_sec_grp" description = "Security group with SSH and Ping opened" } # For SSH resource "openstack_networking_secgroup_rule_v2" "ssh_rule" { direction = "ingress" ethertype = "IPv4" protocol = "tcp" port_range_min = 22 port_range_max = 22 remote_ip_prefix = "0.0.0.0/0" security_group_id = openstack_networking_secgroup_v2.ssh_ping.id } # For Ping resource "openstack_networking_secgroup_rule_v2" "ping_rule" { direction = "ingress" ethertype = "IPv4" protocol = "icmp" remote_ip_prefix = "0.0.0.0/0" security_group_id = openstack_networking_secgroup_v2.ssh_ping.id }