-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecurity.tf
More file actions
40 lines (35 loc) · 827 Bytes
/
Copy pathsecurity.tf
File metadata and controls
40 lines (35 loc) · 827 Bytes
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
37
38
39
40
resource "aws_security_group" "ecs_sg" {
name = "${var.project_name}-sg"
description = "Allow HTTP and container internal traffic"
vpc_id = aws_vpc.main.id
ingress {
description = "Java CRUD (porta 8080)"
from_port = 8080
to_port = 8080
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "Titanic FastAPI (porta 8001)"
from_port = 8001
to_port = 8001
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "CRUD Python (porta 8002)"
from_port = 8002
to_port = 8002
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "${var.project_name}-sg"
}
}