-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tf
More file actions
54 lines (46 loc) · 1.35 KB
/
Copy pathmain.tf
File metadata and controls
54 lines (46 loc) · 1.35 KB
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
#S3
terraform{
backend "s3"{
}
}
#PROVIDER
provider "aws" {
region = "${var.app_region}"
}
#ELB
module "elb" {
source = "./elb"
vpc_id = "${var.vpc_id}"
app_cidr = "${var.app_cidr}"
app_name = "${var.app_name}"
app_port = "${var.app_port}"
env = "${var.env}"
public1_subnet_id = "${var.public1_subnet_id}"
public2_subnet_id = "${var.public2_subnet_id}"
public3_subnet_id = "${var.public3_subnet_id}"
}
#ASG
module "asg" {
source = "./asg"
vpc_id = "${var.vpc_id}"
app_cidr = "${var.app_cidr}"
app_name = "${var.app_name}"
app_port = "${var.app_port}"
env = "${var.env}"
image_id = "${var.image_id}"
private1_subnet_id = "${var.private1_subnet_id}"
private2_subnet_id = "${var.private2_subnet_id}"
private3_subnet_id = "${var.private3_subnet_id}"
sg_elb_id = "${module.elb.sg_elb_id}"
elb_name = "${module.elb.elb_name}"
}
#SCALING POLICIES
module "scaling_policies" {
source = "./scaling_policies"
app_name = "${var.app_name}"
env = "${var.env}"
private1_subnet_id = "${var.private1_subnet_id}"
private2_subnet_id = "${var.private2_subnet_id}"
private3_subnet_id = "${var.private3_subnet_id}"
asg_name = "${module.asg.asg_name}"
}