File tree Expand file tree Collapse file tree 1 file changed +6
-29
lines changed
Expand file tree Collapse file tree 1 file changed +6
-29
lines changed Original file line number Diff line number Diff 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-
6040resource "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 {
You can’t perform that action at this time.
0 commit comments