orchestration-tests/nomad/redis/redis.tf

39 lines
739 B
HCL

resource "nomad_job" "redis" {
hcl2 {
enabled = true
}
jobspec = file("${path.module}/redis.nomad")
}
resource "nomad_job" "rediscommander" {
hcl2 {
enabled = true
}
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"
config_json = jsonencode({
Sources = [
{
Action = "allow"
Name = "blocky-api"
Precedence = 9
Type = "consul"
},
{
Action = "allow"
Name = "rediscommander"
Precedence = 9
Type = "consul"
},
]
})
}