Clean up root module and move lldap to databases
This commit is contained in:
parent
4a7bff7611
commit
f6dd3f4284
@ -1,5 +0,0 @@
|
||||
module "backups" {
|
||||
source = "./backups"
|
||||
|
||||
use_wesher = var.use_wesher
|
||||
}
|
13
core.tf
13
core.tf
@ -1,13 +0,0 @@
|
||||
module "databases" {
|
||||
source = "./databases"
|
||||
}
|
||||
|
||||
module "core" {
|
||||
source = "./core"
|
||||
|
||||
base_hostname = var.base_hostname
|
||||
use_wesher = var.use_wesher
|
||||
|
||||
# Metrics and Blocky depend on databases
|
||||
depends_on = [module.databases]
|
||||
}
|
@ -26,9 +26,3 @@ resource "nomad_job" "syslog-ng" {
|
||||
resource "nomad_job" "ddclient" {
|
||||
jobspec = file("${path.module}/ddclient.nomad")
|
||||
}
|
||||
|
||||
resource "nomad_job" "lldap" {
|
||||
jobspec = templatefile("${path.module}/lldap.nomad", {
|
||||
use_wesher = var.use_wesher,
|
||||
})
|
||||
}
|
||||
|
@ -36,3 +36,14 @@ resource "nomad_job" "redis" {
|
||||
# Block until deployed as there are servics dependent on this one
|
||||
detach = false
|
||||
}
|
||||
|
||||
resource "nomad_job" "lldap" {
|
||||
jobspec = templatefile("${path.module}/lldap.nomad", {
|
||||
use_wesher = var.use_wesher,
|
||||
})
|
||||
|
||||
depends_on = [resource.nomad_job.mysql-server]
|
||||
|
||||
# Block until deployed as there are servics dependent on this one
|
||||
detach = false
|
||||
}
|
||||
|
5
databases/vars.tf
Normal file
5
databases/vars.tf
Normal file
@ -0,0 +1,5 @@
|
||||
variable "use_wesher" {
|
||||
type = bool
|
||||
description = "Indicates whether or not services should expose themselves on the wesher network"
|
||||
default = true
|
||||
}
|
33
main.tf
Normal file
33
main.tf
Normal file
@ -0,0 +1,33 @@
|
||||
module "databases" {
|
||||
source = "./databases"
|
||||
|
||||
use_wesher = var.use_wesher
|
||||
}
|
||||
|
||||
module "core" {
|
||||
source = "./core"
|
||||
|
||||
base_hostname = var.base_hostname
|
||||
use_wesher = var.use_wesher
|
||||
|
||||
# Metrics and Blocky depend on databases
|
||||
depends_on = [module.databases]
|
||||
}
|
||||
|
||||
module "services" {
|
||||
source = "./services"
|
||||
|
||||
use_wesher = var.use_wesher
|
||||
|
||||
# NOTE: It may be possible to flip this and core so core templates don't
|
||||
# need to be rerendered every time a service goes up or down.
|
||||
depends_on = [module.databases, module.core]
|
||||
}
|
||||
|
||||
module "backups" {
|
||||
source = "./backups"
|
||||
|
||||
use_wesher = var.use_wesher
|
||||
|
||||
depends_on = [module.databases, module.services, module.core]
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
module "services" {
|
||||
source = "./services"
|
||||
|
||||
use_wesher = var.use_wesher
|
||||
|
||||
depends_on = [module.databases, module.core]
|
||||
}
|
Loading…
Reference in New Issue
Block a user