-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
49 lines (42 loc) · 934 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
40
41
42
43
44
45
46
47
48
49
terraform {
backend "s3" {
bucket = "deerpark-terraform-state"
key = "terraform-aws-ecs-free-tier/terraform.tfstate"
region = "us-east-2"
}
}
provider "aws" {}
module "vpc" {
source = "./vpc"
name_prefix = var.name_prefix
}
module "rds" {
source = "./rds"
name_prefix = var.name_prefix
vpc = module.vpc.vpc
subnets = module.vpc.subnets
}
module "redis" {
source = "./redis"
name_prefix = var.name_prefix
vpc = module.vpc.vpc
subnets = module.vpc.subnets
}
module "ecs" {
source = "./ecs"
name_prefix = var.name_prefix
vpc = module.vpc.vpc
subnets = module.vpc.subnets
ecs_cluster_name = var.ecs_cluster_name
certificate_arn = var.certificate_arn
domain_name = var.domain_name
subdomain_url = var.subdomain_url
}
module "task_execution_role" {
source = "./task-execution-role"
name_prefix = var.name_prefix
}
module "ecr" {
source = "./ecr"
ecr_repos = var.ecr_repos
}