-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
40 lines (34 loc) · 1.34 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.region
}
module "vpc" {
source = "./vpc"
}
module "security-group" {
source = "./security-group"
expected_vpc_id = module.vpc.vpc_id
}
module "launch-template" {
source = "./launch-template"
image_id = "ami-0f673487d7e5f89ca"
instance_type = "t2.micro"
aws_security_group_id = module.security-group.aws_security_group_id
}
module "autoscaling-group" {
source = "./autoscaling-group"
aws_subnet_public_subnet-1 = module.vpc.tf-public-subnet-1-id
aws_subnet_public_subnet-2 = module.vpc.tf-public-subnet-2-id
launch-template-id = module.launch-template.launch-template-id
launch-template-version = module.launch-template.launch-template-version-latest
nlb-target-group-arn = module.target-group.target-group-arn
}
module "target-group" {
source = "./target-group"
vpc_id = module.vpc.vpc_id
}
module "network-load-balancer" {
source = "./network-load-balancer"
nlb-subnet-1 = module.vpc.tf-public-subnet-1-id
nlb-subnet-2 = module.vpc.tf-public-subnet-2-id
target-group-arn = module.target-group.target-group-arn
}