-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.tf
39 lines (34 loc) · 1021 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
provider "aws" {
profile = "${var.profile}"
region = "${var.region}"
}
module "vpc" {
source = "./modules/vpc"
env = "${var.env}"
region = "${var.region}"
}
module "iam" {
source = "./modules/iam"
env = "${var.env}"
}
module "ecs" {
source = "./modules/ecs"
env = "${var.env}"
region = "${var.region}"
role_arn = "${module.iam.role_arn}"
tg_arn = "${module.alb.tg_arn}"
vpc_id = "${module.vpc.out_vpc_id}"
vpc_cidr_block = "${module.vpc.out_vpc_cidr_block}"
app_sub1_id = "${module.vpc.out_app_sub1_id}"
app_sub2_id = "${module.vpc.out_app_sub2_id}"
task_role_arn = "${module.iam.task_role_arn}"
}
module "alb" {
source = "./modules/alb"
env = "${var.env}"
region = "${var.region}"
vpc_id = "${module.vpc.out_vpc_id}"
vpc_cidr_block = "${module.vpc.out_vpc_cidr_block}"
pub_sub1_id = "${module.vpc.out_pub_sub1_id}"
pub_sub2_id = "${module.vpc.out_pub_sub2_id}"
}