-
Notifications
You must be signed in to change notification settings - Fork 5
/
security_group_elb.tf
36 lines (33 loc) · 1.21 KB
/
security_group_elb.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
resource "aws_security_group" "ingress_elb" {
name = "${module.label.id}-ingress-elb"
description = "Security group for the ingress ELB"
vpc_id = var.vpc_id
tags = module.label.tags
}
resource "aws_security_group_rule" "ingress_elb_egress" {
description = "Allow all egress traffic"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:AWS007
security_group_id = aws_security_group.ingress_elb.id
type = "egress"
}
resource "aws_security_group_rule" "ingress_elb_port_http" {
description = "Allow HTTP traffic from everywhere"
from_port = 80
to_port = 80
protocol = "TCP"
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:AWS006
security_group_id = aws_security_group.ingress_elb.id
type = "ingress"
}
resource "aws_security_group_rule" "ingress_elb_port_https" {
description = "Allow HTTPS traffic from everywhere"
from_port = 443
to_port = 443
protocol = "TCP"
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:AWS006
security_group_id = aws_security_group.ingress_elb.id
type = "ingress"
}