-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
42 lines (33 loc) · 1.09 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
provider "aws" {
region = "us-east-1"
}
terraform {
backend "s3" {
bucket = "hodhod-terraform-state"
key = "terraform.tfstate"
region = "us-east-1"
#dynamodb_table = "hodhod-terraform-state-lock"
}
}
module "vpc" {
source = "./modules/vpc"
}
module "launch_template" {
source = "./modules/launch_template"
vpc_id = module.vpc.vpc_id
}
module "database" {
source = "./modules/database"
vpc_id = module.vpc.vpc_id
database_subnet_id = module.vpc.private_subnet_id
vpc_cidr_block = module.vpc.vpc_cidr_block
}
module "autoscaling" {
source = "./modules/autoscaling"
launch_template_id = module.launch_template.launch_template_id
subnet_ids = [module.vpc.public_subnet_id, module.vpc.public_subnet_id2]
depends_on = [module.vpc, module.database]
launch_template_latest_version = module.launch_template.launch_template_latest_version
vpc_id = module.vpc.vpc_id
allow_all_sg = module.launch_template.allow_all_sg
}