-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path2.security-groups.tf
49 lines (47 loc) · 1.14 KB
/
2.security-groups.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
module "rds_sg" {
source = "./modules/security-group"
project = local.vars.project
env = local.environment
name = "rds_db"
vpc_id = module.vpc.vpc_id
ingress_port_cidr_targets = [
{
port = local.vars.rds.port
protocol = "tcp"
cidr_blocks = [local.vars.network.cidr_main]
},
]
}
module "ecs_sg" {
source = "./modules/security-group"
project = local.vars.project
env = local.environment
name = "ecs"
vpc_id = module.vpc.vpc_id
ingress_port_cidr_targets = [ # You can open more port based on your demands
{
port = 22
protocol = "tcp"
cidr_blocks = [local.vars.network.cidr_main]
},
{
port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
]
}
module "bastion_sg" {
source = "./modules/security-group"
project = local.vars.project
env = local.environment
name = "bastion"
vpc_id = module.vpc.vpc_id
ingress_port_cidr_targets = [ # You can open more port based on your demands
{
port = 22
protocol = "tcp"
cidr_blocks = local.vars.network.trust_ips
}
]
}