-
Notifications
You must be signed in to change notification settings - Fork 1
/
security_group.tf
34 lines (25 loc) · 1.26 KB
/
security_group.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
resource "aws_security_group" "sumologic-demo-control-plane" {
name = "sumologic-demo/ControlPlaneSecurityGroup"
description = "Communication between the control plane and worker nodegroups"
vpc_id = aws_vpc.sumologic-demo.id
}
resource "aws_security_group" "sumologic-demo-cluster-shared" {
name = "sumologic-demo/ClusterSharedNodeSecurityGroup"
description = "Communication between all nodes in the cluster"
vpc_id = aws_vpc.sumologic-demo.id
}
resource "aws_vpc_security_group_ingress_rule" "sumologic-demo-node-to-cluster" {
referenced_security_group_id = aws_security_group.sumologic-demo-control-plane.id
security_group_id = aws_security_group.sumologic-demo-cluster-shared.id
ip_protocol = "-1"
}
resource "aws_vpc_security_group_ingress_rule" "sumologic-demo-inter-node-group" {
referenced_security_group_id = aws_security_group.sumologic-demo-cluster-shared.id
security_group_id = aws_security_group.sumologic-demo-cluster-shared.id
ip_protocol = "-1"
}
resource "aws_vpc_security_group_ingress_rule" "sumologic-demo-default-cluster-to-node" {
referenced_security_group_id = aws_security_group.sumologic-demo-cluster-shared.id
security_group_id = aws_security_group.sumologic-demo-control-plane.id
ip_protocol = "-1"
}