-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
60 lines (52 loc) · 1.5 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
module "vpc" {
source = "./modules/vpc"
cidr_block_vpc = var.cidr_block_vpc
vpc_name = var.vpc_name
Department = var.Department
}
module "subnet" {
source = "./modules/subnet"
vpc_id = module.vpc.vpc_id
cidr_block_public = var.cidr_block_public
availability_zone_public = var.availability_zone_public
public_subnet_name = var.public_subnet_name
Department = var.Department
cidr_block_private = var.cidr_block_private
availability_zone_private = var.availability_zone_private
private_subnet_name = var.private_subnet_name
}
module "SG"{
source = "./modules/SG"
security_group_name = var.security_group_name
security_group_description = var.security_group_description
vpc_id = module.vpc.vpc_id
cidr_block_vpc = var.cidr_block_vpc
sg_name = var.sg_name
Department = var.Department
}
module "route" {
source = "./modules/route"
vpc_id = module.vpc.vpc_id
route_cidr_block = var.route_cidr_block
pubroute_name = var.pubroute_name
Department = var.Department
pub_subnet_id = module.subnet.pub_subnet_id
prvRoute_name = var.prvroute_name
prv_subnet_id = module.subnet.prv_subnet_id
natgw_name = var.natgw_name
name_gw = var.name_gw
eip_name = var.eip_name
}
module "ec2" {
source = "./modules/ec2"
ami = var.ami
instance_type = var.instance_type
key_name = var.key_name
availability_zone_ec2 = var.availability_zone_ec2
prv_subnet_id = module.subnet.prv_subnet_id
security_group_id = module.SG.security_group_id
server_name = var.server_name
Department = var.Department
description_eni = var.description_eni
eni_name = var.eni_name
}