diff --git a/vpc.tf b/vpc.tf index 53f9112..84135bb 100644 --- a/vpc.tf +++ b/vpc.tf @@ -31,3 +31,21 @@ resource "ibm_is_security_group" "sg" { name = var.security_group_name vpc = var.create_vpc ? ibm_is_vpc.vpc[0].id : data.ibm_is_vpc.existing_vpc[0].id } + +resource "ibm_is_security_group_rule" "allow_vpn_ports" { + direction = "inbound" + group = ibm_is_security_group.sg.id + ip_version = "ipv4" + remote = "0.0.0.0/0" + + tcp { + port_min = 22 + port_max = 443 + } +} +resource "ibm_is_security_group_rule" "allow_all_outbound" { + direction = "outbound" + group = ibm_is_security_group.sg.id + remote = "0.0.0.0/0" + ip_version = "ipv4" +} \ No newline at end of file