-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
30 lines (26 loc) · 809 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
module "network" {
source = "./modules/network"
db_subnet_1_az = var.db_subnet_1_az
db_subnet_2_az = var.db_subnet_2_az
eks_private_1_az = var.eks_private_1_az
eks_private_2_az = var.eks_private_2_az
eks_public_1_az = var.eks_public_1_az
eks_public_2_az = var.eks_public_2_az
cluster_name = var.cluster_name
}
module "webserver" {
source = "./modules/webserver"
cluster_name = var.cluster_name
eks_subnet_ids = module.network.eks_subnet_ids
node_subnet_ids = module.network.node_subnet_ids
depends_on = [
module.network
]
}
module "database" {
source = "./modules/database"
vpc_id = module.network.vpc_id
db_subnet_ids = module.network.db_subnet_ids
username = var.db_username
password = var.db_password
}