-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmain.tf
38 lines (32 loc) · 945 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
resource "kubernetes_namespace" "druid" {
metadata {
name = var.namespace
}
}
resource "kubernetes_config_map" "common_config" {
metadata {
name = "druid-common-config"
namespace = kubernetes_namespace.druid.metadata.0.name
}
data = {
POSTGRES_URL = local.postgres_url
POSTGRES_PORT = var.postgres_port
POSTGRES_USER = var.postgres_user
POSTGRES_PASSWORD = var.postgres_password
POSTGRES_DB = var.postgres_db
ZOOKEEPER_SERVER = local.zookeeper_server
JVM_PEONS_ARGS = format("-Daws.region=%s", var.aws_region)
}
}
module "postgres" {
source = "./modules/postgres"
enable = var.create_postgres
namespace = var.postgres_namespace
config_map_name = "druid-common-config"
}
module "zookeeper" {
source = "./modules/zookeeper"
enable = var.create_zookeeper
namespace = var.zookeeper_namespace
replicas = var.zookeeper_replicas
}