2022-03-12 18:07:52 +00:00
|
|
|
module "mysql-server" {
|
|
|
|
source = "./mysql"
|
2022-03-14 22:56:06 +00:00
|
|
|
}
|
2022-03-12 18:07:52 +00:00
|
|
|
|
2022-03-14 22:56:06 +00:00
|
|
|
module "redis" {
|
|
|
|
source = "./redis"
|
2022-03-12 18:07:52 +00:00
|
|
|
}
|
2022-02-16 17:56:18 +00:00
|
|
|
|
2022-02-28 20:07:34 +00:00
|
|
|
module "blocky" {
|
|
|
|
source = "./blocky"
|
|
|
|
|
|
|
|
base_hostname = var.base_hostname
|
2022-05-25 03:10:26 +00:00
|
|
|
depends_on = [module.redis]
|
2022-02-28 20:07:34 +00:00
|
|
|
}
|
|
|
|
|
2022-02-27 23:22:09 +00:00
|
|
|
module "traefik" {
|
|
|
|
source = "./traefik"
|
2022-02-16 17:56:18 +00:00
|
|
|
|
2022-02-27 23:22:09 +00:00
|
|
|
consul_address = var.consul_address
|
2022-04-13 21:01:14 +00:00
|
|
|
base_hostname = var.base_hostname
|
2022-02-16 17:56:18 +00:00
|
|
|
}
|
|
|
|
|
2022-03-03 17:37:49 +00:00
|
|
|
module "metrics" {
|
|
|
|
source = "./metrics"
|
2022-02-16 17:56:18 +00:00
|
|
|
|
2022-03-03 17:37:49 +00:00
|
|
|
consul_address = var.consul_address
|
2022-02-16 17:56:18 +00:00
|
|
|
}
|
|
|
|
|
2022-03-12 18:07:52 +00:00
|
|
|
module "nextcloud" {
|
|
|
|
source = "./nextcloud"
|
|
|
|
|
|
|
|
depends_on = [module.mysql-server]
|
|
|
|
}
|
2022-03-03 17:37:49 +00:00
|
|
|
|
2022-05-18 21:23:28 +00:00
|
|
|
module "backups" {
|
|
|
|
source = "./backups"
|
|
|
|
|
|
|
|
depends_on = [module.mysql-server]
|
|
|
|
}
|
|
|
|
|
2022-04-05 05:20:19 +00:00
|
|
|
module "media" {
|
|
|
|
source = "./media"
|
|
|
|
}
|
|
|
|
|
2022-02-16 17:56:18 +00:00
|
|
|
resource "nomad_job" "whoami" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
2022-02-27 22:49:00 +00:00
|
|
|
vars = {
|
2022-03-22 04:26:04 +00:00
|
|
|
"count" = "${2 * length(data.consul_service.nomad.service)}",
|
2022-02-27 22:49:00 +00:00
|
|
|
}
|
2022-02-16 17:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/whoami.nomad")
|
|
|
|
}
|
2022-03-14 22:58:47 +00:00
|
|
|
|
|
|
|
resource "consul_config_entry" "global_access" {
|
|
|
|
name = "*"
|
|
|
|
kind = "service-intentions"
|
|
|
|
|
|
|
|
config_json = jsonencode({
|
|
|
|
Sources = [
|
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "traefik"
|
|
|
|
Precedence = 6
|
|
|
|
Type = "consul"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Action = "deny"
|
|
|
|
Name = "*"
|
|
|
|
Precedence = 5
|
|
|
|
Type = "consul"
|
|
|
|
},
|
|
|
|
]
|
|
|
|
})
|
|
|
|
}
|