2022-03-14 22:56:06 +00:00
|
|
|
resource "nomad_job" "redis" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/redis.nomad")
|
2022-06-23 16:48:01 +00:00
|
|
|
|
|
|
|
# Block until deployed as there are servics dependent on this one
|
|
|
|
detach = false
|
2022-03-14 22:56:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "rediscommander" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/rediscommander.nomad")
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "consul_config_entry" "redis_intents" {
|
|
|
|
name = "redis"
|
|
|
|
kind = "service-intentions"
|
|
|
|
|
|
|
|
config_json = jsonencode({
|
|
|
|
Sources = [
|
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "blocky-api"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "rediscommander"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-06-23 16:48:01 +00:00
|
|
|
{
|
|
|
|
Action = "allow"
|
|
|
|
Name = "authelia"
|
|
|
|
Precedence = 9
|
|
|
|
Type = "consul"
|
|
|
|
},
|
2022-03-14 22:56:06 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
}
|