orchestration-tests/nomad/databases/redis.tf

47 lines
888 B
Terraform
Raw Permalink Normal View History

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
}
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"
},
]
})
}