Skip to content

Commit b2b376d

Browse files
author
Sean Sundberg
authored
Adds rules to default security group (#42)
- Adds inbound ping rule - Adds inbound http rule Signed-off-by: Sean Sundberg <[email protected]>
1 parent 8e8fc9b commit b2b376d

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

main.tf

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,28 @@ resource null_resource print_sg_name {
7878
}
7979

8080
# from https://cloud.ibm.com/docs/vpc?topic=vpc-service-endpoints-for-vpc
81-
resource ibm_is_security_group_rule "cse_dns_1" {
81+
resource ibm_is_security_group_rule default_inbound_ping {
82+
group = data.ibm_is_vpc.vpc.default_security_group
83+
direction = "inbound"
84+
remote = "0.0.0.0/0"
85+
86+
icmp {
87+
type = 8
88+
}
89+
}
90+
91+
resource ibm_is_security_group_rule default_inbound_http {
92+
group = data.ibm_is_vpc.vpc.default_security_group
93+
direction = "inbound"
94+
remote = "0.0.0.0/0"
95+
96+
tcp {
97+
port_min = 80
98+
port_max = 80
99+
}
100+
}
101+
102+
resource ibm_is_security_group_rule cse_dns_1 {
82103
count = local.security_group_count
83104

84105
group = local.security_group_ids[count.index]

0 commit comments

Comments
 (0)