-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
48 lines (41 loc) · 907 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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
provider "aws" {
region = var.region
}
locals {
az1 = "${var.region}a"
# az2 = "${var.region}b"
}
module "network" {
source = "./modules/network"
region = var.region
workload = var.workload
az1 = local.az1
# az2 = local.az2
ip_to_drop = var.ip_to_drop
}
module "server" {
source = "./modules/server"
workload = var.workload
vpc_id = module.network.vpc_id
subnet = module.network.public_subnets[0]
az = local.az1
}
# module "nat-gateway" {
# source = "./modules/nat-gateway"
# workload = var.workload
# subnet = module.network.public_subnets[0]
# }
# module "lb" {
# source = "./modules/lb"
# workload = var.workload
# vpc_id = module.network.vpc_id
# subnets = module.network.public_subnets
# azs = [local.az1, local.az2]
# }