-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
37 lines (32 loc) · 1.15 KB
/
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
module "auto-scaling" {
source = "./modules/auto-scaling"
repo-name = var.repo-name
#vpc_zone_identifier = module.networking.vpc.vpc_id
subnet_id = module.networking.vpc.public_subnets[0]
security_group = [module.networking.webserver-sg.id]
key_name = module.key_gen.key_name
target_group_arns = module.elastic-load-balancer.elb_id
}
module "networking" {
source = "./modules/vpc"
repo-name = var.repo-name
}
module "key_gen" {
source = "./modules/aws_keys"
repo-name = var.repo-name
}
module "bastion-auto-scaling" {
source = "./modules/bastion-asg"
repo-name = var.repo-name
#vpc_zone_identifier = module.networking.vpc.vpc_id
subnet_id = module.networking.vpc.public_subnets[0]
security_group = [module.networking.bastion-host-sg.id]
key_name = module.key_gen.key_name
}
module "elastic-load-balancer" {
source = "./modules/load-balancer"
repo-name = var.repo-name
security_group = [module.networking.webserver-sg.id]
subnet_id = [module.networking.vpc.public_subnets[0], module.networking.vpc.public_subnets[1]]
vpc = module.networking.vpc.vpc_id
}