-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.tf
57 lines (49 loc) · 2.38 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
////////////////////////////////////////////////[ INFRASTRUCTURE DEPLOYMENT ]/////////////////////////////////////////////
# # ---------------------------------------------------------------------------------------------------------------------#
# Create VPC and base networking layout
# # ---------------------------------------------------------------------------------------------------------------------#
module "network" {
source = "./modules/network"
project = local.project
vpc_cidr = var.vpc_cidr
region = var.region
}
# # ---------------------------------------------------------------------------------------------------------------------#
# Create load balancer with domain and dns settings + ssl letsencrypt
# # ---------------------------------------------------------------------------------------------------------------------#
module "loadbalancer" {
source = "./modules/loadbalancer"
project = local.project
region = var.region
vpc_uuid = module.network.vpc_uuid
size = var.loadbalancer.size
algorithm = "round_robin"
alert_email = var.alert_email
domain = local.domain
}
# # ---------------------------------------------------------------------------------------------------------------------#
# Create managed services [mysql | redis]
# # ---------------------------------------------------------------------------------------------------------------------#
module "database" {
source = "./modules/database"
database = var.database
project = local.project
region = var.region
vpc_uuid = module.network.vpc_uuid
vpc_cidr = var.vpc_cidr
}
# # ---------------------------------------------------------------------------------------------------------------------#
# Create kubernetes cluster
# # ---------------------------------------------------------------------------------------------------------------------#
module "kubernetes" {
source = "./modules/kubernetes"
kubernetes_version = local.kubernetes_version
kubernetes = var.kubernetes
project = local.project
region = var.region
vpc_uuid = module.network.vpc_uuid
domain = local.domain
timezone = var.timezone
brand = var.brand
docker_registry = var.docker_registry
}