-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
42 lines (37 loc) · 872 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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.19.0"
}
}
}
provider "aws" {
region = var.aws_region
}
locals {
workload = "blackoak"
}
module "vpc" {
source = "./modules/vpc"
aws_region = var.aws_region
workload = local.workload
}
module "rds_mysql" {
source = "./modules/mysql"
workload = local.workload
vpc_id = module.vpc.vpc_id
subnets = module.vpc.private_subnets
multi_az = var.rds_multi_az
instance_class = var.rds_instance_class
username = var.rds_username
password = var.rds_password
}
module "jumpserver" {
source = "./modules/jumpserver"
workload = local.workload
vpc_id = module.vpc.vpc_id
az = module.vpc.azs[0]
subnet = module.vpc.public_subnets[0]
allow_ssh = var.jumpserver_allow_ssh
}