Move databases to a single module

This commit is contained in:
IamTheFij 2022-06-23 09:48:01 -07:00
parent 37c6fd4735
commit 37c4ab4c25
7 changed files with 20 additions and 10 deletions

View File

@ -36,6 +36,12 @@ resource "consul_config_entry" "mysql_intents" {
Precedence = 9
Type = "consul"
},
{
Action = "allow"
Name = "backups"
Precedence = 9
Type = "consul"
},
]
})
}

View File

@ -4,6 +4,9 @@ resource "nomad_job" "redis" {
}
jobspec = file("${path.module}/redis.nomad")
# Block until deployed as there are servics dependent on this one
detach = false
}
resource "nomad_job" "rediscommander" {
@ -14,7 +17,6 @@ resource "nomad_job" "rediscommander" {
jobspec = file("${path.module}/rediscommander.nomad")
}
# NOTE: This may need to be moved to after the services are created
resource "consul_config_entry" "redis_intents" {
name = "redis"
kind = "service-intentions"
@ -33,6 +35,12 @@ resource "consul_config_entry" "redis_intents" {
Precedence = 9
Type = "consul"
},
{
Action = "allow"
Name = "authelia"
Precedence = 9
Type = "consul"
},
]
})
}

View File

@ -1,16 +1,12 @@
module "mysql-server" {
source = "./mysql"
}
module "redis" {
source = "./redis"
module "databases" {
source = "./databases"
}
module "blocky" {
source = "./blocky"
base_hostname = var.base_hostname
depends_on = [module.redis]
depends_on = [module.databases]
}
module "traefik" {
@ -29,13 +25,13 @@ module "metrics" {
module "nextcloud" {
source = "./nextcloud"
depends_on = [module.mysql-server]
depends_on = [module.databases]
}
module "backups" {
source = "./backups"
depends_on = [module.mysql-server]
depends_on = [module.databases]
}
module "media" {