-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
40 lines (31 loc) · 815 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
module "vpc" {
source = "./modules/vpc"
vpc_name = "module-vpc"
}
module "k8s" {
source = "./modules/k8s"
vpc_id = module.vpc.vpc_id
subnet_id = module.vpc.private_subnet_id
eks-config = var.eks-config
}
module "bastion" {
source = "./modules/vm"
ssh_key_pair = var.ssh_key_pair
vm_name = "bastion_vm"
subnet_id = module.vpc.public_subnet_id[0]
init_script = "./helper/init.sh"
security_group_ids = [
module.vpc.security_group_allow_ssh,
module.vpc.security_group_allow_egress
]
}
module "private_bastion" {
source = "./modules/vm"
ssh_key_pair = var.ssh_key_pair
vm_name = "private_vm"
subnet_id = module.vpc.private_subnet_id[0]
security_group_ids = [
module.vpc.security_group_allow_ssh,
module.vpc.security_group_allow_egress
]
}