-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecurity-group.tf
67 lines (62 loc) · 1.42 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
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
resource "aws_security_group" "cspm_instance_sg" {
name = "cspm_instance_security_group"
vpc_id = aws_vpc.cspm_vpc.id
ingress = [ {
cidr_blocks = [ "0.0.0.0/0" ]
description = "SSH"
from_port = 22
ipv6_cidr_blocks = null
prefix_list_ids = null
protocol = "tcp"
security_groups = null
self = false
to_port = 22
}, {
cidr_blocks = [ "0.0.0.0/0" ]
description = "CSPM Service Port"
from_port = 10831
ipv6_cidr_blocks = null
prefix_list_ids = null
protocol = "tcp"
security_groups = null
self = false
to_port = 10831
} ]
egress = [ {
cidr_blocks = [ "0.0.0.0/0" ]
description = "Default"
from_port = 0
ipv6_cidr_blocks = null
prefix_list_ids = null
protocol = -1
security_groups = null
self = false
to_port = 0
} ]
}
resource "aws_security_group" "cspm_db_sg" {
name = "cspm_db_security_group"
vpc_id = aws_vpc.cspm_vpc.id
ingress = [ {
cidr_blocks = null
description = "MySQL"
from_port = 3306
ipv6_cidr_blocks = null
prefix_list_ids = null
protocol = "tcp"
security_groups = [ aws_security_group.cspm_instance_sg.id ]
self = false
to_port = 3306
} ]
egress = [ {
cidr_blocks = [ "0.0.0.0/0" ]
description = "Default"
from_port = 0
ipv6_cidr_blocks = null
prefix_list_ids = null
protocol = -1
security_groups = null
self = false
to_port = 0
} ]
}