-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathaws_security_groups.cassandra.tf
95 lines (83 loc) · 1.93 KB
/
aws_security_groups.cassandra.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
resource "aws_security_group" "cassandra" {
name = "Cassandra"
description = "Terraform Cassandra security group"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
description = "For SSH access"
cidr_blocks = var.ssh-inbound-range
}
ingress {
from_port = 9042
to_port = 9042
protocol = "tcp"
description = "CSQLSH port"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 9160
to_port = 9160
protocol = "tcp"
description = "Cassandra Thrift port"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 8888
to_port = 8888
protocol = "tcp"
description = "opscenterd webui"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 0
to_port = 65535
protocol = "tcp"
description = "allows traffic from the SG itself for TCP"
self = true
}
ingress {
from_port = 7199
to_port = 7199
protocol = "tcp"
description = "allow traffic for TCP 7199 (JMX)"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 7000
to_port = 7000
protocol = "tcp"
description = "7000 Inter-node cluster"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 7001
to_port = 7001
protocol = "tcp"
description = "Inter-node cluster SSL"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 61620
to_port = 61620
protocol = "tcp"
description = "opscenterd daemon"
cidr_blocks = var.allowed_ranges
}
ingress {
from_port = 61621
to_port = 61621
protocol = "tcp"
description = "opscenterd agent"
cidr_blocks = var.allowed_ranges
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
description = "Allow outbound"
# tfsec:ignore:AWS009
cidr_blocks = ["0.0.0.0/0"]
}
vpc_id = var.vpc_id
}