-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
50 lines (39 loc) · 891 Bytes
/
main.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
module "network" {
source = "./modules/network"
az_count = 2
cidr_block = "172.17.0.0/16"
providers = {
aws = "aws" # .alias
}
}
module "security" {
source = "./modules/security"
vpc_main_id = module.network.vpc_main_id
name = var.name
app_port = 80
providers = {
aws = "aws"
}
}
module "logs" {
source = "./modules/logs"
name = var.name
}
module "alb" {
source = "./modules/alb"
vpc_main_id = module.network.vpc_main_id
public_subnets = module.network.public_subnets
security_group = module.security.lb_sg
name = var.name
providers = {
aws = "aws"
}
}
module "ecs" {
source = "./modules/ecs"
private_subnets = module.network.private_subnets
ecs_sg = module.security.ecs_sg
alb_tg = module.alb.target_group
name = var.name
app_image = var.image
}