2022-02-27 23:22:09 +00:00
|
|
|
resource "nomad_job" "mysql-server" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/mysql.nomad")
|
2022-05-25 03:10:26 +00:00
|
|
|
|
|
|
|
# Block until deployed as there are servics dependent on this one
|
|
|
|
detach = false
|
2022-02-27 23:22:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "adminer" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/adminer.nomad")
|
|
|
|
}
|
2022-03-14 22:58:47 +00:00
|
|
|
|
|
|
|
# NOTE: This may need to be moved to after the services are created
|
|
|
|
resource "consul_config_entry" "mysql_intents" {
|
2022-03-14 23:56:44 +00:00
|
|
|
name = "mysql-server"
|
2022-03-14 22:58:47 +00:00
|
|
|
kind = "service-intentions"
|
|
|
|
|
|
|
|
config_json = jsonencode({
|
|
|
|
Sources = [
|
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "adminer"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "nextcloud"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-06-23 16:48:01 +00:00
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "backups"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-07-29 20:02:22 +00:00
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "grafana"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-11-12 00:21:17 +00:00
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "blocky-api"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-11-10 19:15:43 +00:00
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "photoprism"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-11-15 19:43:05 +00:00
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "authelia"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-03-14 22:58:47 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
}
|