-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
41 lines (37 loc) · 1.23 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
38
39
40
41
module "networking" {
source = "./modules/networking"
namespace = var.namespace
}
module "ssh-key" {
source = "./modules/ssh-key"
namespace = var.namespace
}
module "ec2" {
source = "./modules/ec2"
namespace = var.namespace
vpc = module.networking.vpc
sg_pub_id = module.networking.sg_pub_id
default_sg_id = module.networking.default_sg_id
# sg_priv_id = module.networking.sg_priv_id
key_name = module.ssh-key.key_name
role1 = module.rds.role1
}
module "alb" {
source = "./modules/alb"
namespace = var.namespace
vpc = module.networking.vpc
public_subnets = module.networking.public_subnets
default_sg = module.networking.default_sg
sg_priv = module.networking.sg_priv
ec2_private01 = module.ec2.ec2_private01
ec2_private02 = module.ec2.ec2_private02
public_ip = module.ec2.public_ip
region = var.region
ec2_public = module.ec2.ec2_public
db_instance_endpoint = module.rds.db_instance_endpoint
}
module "rds" {
source = "./modules/rds"
default_sg = module.networking.default_sg
private_subnets = module.networking.private_subnets
}