54 lines
1.1 KiB
Terraform
Raw Normal View History

2022-02-27 15:22:09 -08:00
resource "nomad_job" "mysql-server" {
hcl2 {
enabled = true
}
jobspec = file("${path.module}/mysql.nomad")
# Block until deployed as there are servics dependent on this one
detach = false
2022-02-27 15:22:09 -08:00
}
resource "nomad_job" "adminer" {
hcl2 {
enabled = true
}
jobspec = file("${path.module}/adminer.nomad")
}
2022-03-14 15:58:47 -07:00
# NOTE: This may need to be moved to after the services are created
resource "consul_config_entry" "mysql_intents" {
2022-03-14 16:56:44 -07:00
name = "mysql-server"
2022-03-14 15:58:47 -07: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 09:48:01 -07:00
{
Action = "allow"
Name = "backups"
Precedence = 9
Type = "consul"
},
2022-07-29 13:02:22 -07:00
{
Action = "allow"
Name = "grafana"
Precedence = 9
Type = "consul"
},
2022-03-14 15:58:47 -07:00
]
})
}