-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
40 lines (32 loc) · 1.05 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
provider "aws" {
region = "${var.aws_region}"
profile = "ibuchh-ecs"
}
module "iam" {
source = "./iam"
}
module "vpc" {
source = "./vpc"
}
module "ec2" {
source = "./ec2"
vpc-id = "${module.vpc.id}"
security-group-id = "${module.vpc.security-group-id}"
subnet-id-1 = "${module.vpc.subnet1-id}"
subnet-id-2 = "${module.vpc.subnet2-id}"
ecs-instance-role-name = "${module.iam.ecs-instance-role-name}"
ecs-instance-profile-name = "${module.iam.ecs-instance-profile-name}"
ecs-cluster-name = "${var.ecs-cluster-name}"
ecs-key-pair-name = "${var.ecs-key-pair-name}"
}
module "ecs" {
source = "./ecs"
//depends_on = [
// "${module.ec2.ecs-target-group-arn}",
//]
//wait_on = "${module.ec2.ecs-target-group-arn}"
ecs-cluster-name = "${var.ecs-cluster-name}"
ecs-load-balancer-name = "${module.ec2.ecs-load-balancer-name}"
ecs-target-group-arn = "${module.ec2.ecs-target-group-arn}"
ecs-service-role-arn = "${module.iam.ecs-service-role-arn}"
}