-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathsecurity-groups.tf
More file actions
29 lines (26 loc) · 824 Bytes
/
security-groups.tf
File metadata and controls
29 lines (26 loc) · 824 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
resource "aws_security_group" "all_worker_mgmt" {
name_prefix = "all_worker_management"
vpc_id = module.vpc.vpc_id
}
resource "aws_security_group_rule" "all_worker_mgmt_ingress" {
description = "allow inbound traffic from eks"
from_port = 0
protocol = "-1"
to_port = 0
security_group_id = aws_security_group.all_worker_mgmt.id
type = "ingress"
cidr_blocks = [
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
]
}
resource "aws_security_group_rule" "all_worker_mgmt_egress" {
description = "allow outbound traffic to anywhere"
from_port = 0
protocol = "-1"
security_group_id = aws_security_group.all_worker_mgmt.id
to_port = 0
type = "egress"
cidr_blocks = ["0.0.0.0/0"]
}