-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
37 lines (32 loc) · 996 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
module "networking" {
source = "./modules/networking"
ec2_cidr = module.ec2.ec2_cidr
repo-name = var.repo-name
user-name = var.user-name
}
module "ec2" {
source = "./modules/ec2"
vpc = module.networking.vpc.vpc_id
key_name = module.key_gen.key_name
subnet_id = module.networking.vpc.public_subnets[0]
security_group = [module.networking.jenkins-main-sg.id]
repo-name = var.repo-name
user-name = var.user-name
}
module "key_gen" {
source = "./modules/aws_keys"
repo-name = var.repo-name
user-name = var.user-name
}
module "ec2_node" {
source = "./modules/node_ec2"
vpc = module.networking.vpc.vpc_id
key_name = module.key_gen.key_name
subnet_id = module.networking.vpc.public_subnets[0]
security_group = [module.networking.jenkins-node-sg.id]
repo-name = var.repo-name
user-name = var.user-name
}
module "resource_group" {
source = "./modules/resource_group"
}