Skip to content

Commit 32108ef

Browse files
committed
fix(main.tf): update cidr blocks of security group
1 parent 5acafc7 commit 32108ef

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

tf/main.tf

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,17 @@ resource "aws_default_vpc" "default" {
3737
}
3838
}
3939

40-
locals {
41-
cloudflare_ipv4_ranges = [
42-
"173.245.48.0/20",
43-
"103.21.244.0/22",
44-
"103.22.200.0/22",
45-
"103.31.4.0/22",
46-
"141.101.64.0/18",
47-
"108.162.192.0/18",
48-
"190.93.240.0/20",
49-
"188.114.96.0/20",
50-
"197.234.240.0/22",
51-
"198.41.128.0/17",
52-
"162.158.0.0/15",
53-
"104.16.0.0/13",
54-
"104.24.0.0/14",
55-
"172.64.0.0/13",
56-
"131.0.72.0/22"
57-
]
58-
}
59-
6040
resource "aws_security_group" "app_sg" {
6141
name = "${var.project_name}-sg"
6242
description = "Enable SSH and application PORT"
6343
vpc_id = aws_default_vpc.default.id
6444

65-
dynamic "ingress" {
66-
for_each = local.cloudflare_ipv4_ranges
67-
content {
68-
from_port = 80
69-
to_port = 80
70-
protocol = "tcp"
71-
cidr_blocks = [ingress.value]
72-
description = "HTTP from Cloudflare"
73-
}
45+
ingress {
46+
from_port = 80
47+
to_port = 80
48+
protocol = "tcp"
49+
cidr_blocks = ["0.0.0.0/0"]
50+
description = "HTTP Publico"
7451
}
7552

7653
ingress {

0 commit comments

Comments
 (0)