homelab-nomad/services.tf

50 lines
813 B
Terraform
Raw Normal View History

2022-02-16 17:56:18 +00:00
module "nextcloud" {
source = "./nextcloud"
2022-06-23 16:48:01 +00:00
depends_on = [module.databases]
}
module "backups" {
source = "./backups"
2022-06-23 16:48:01 +00:00
depends_on = [module.databases]
}
module "media" {
source = "./media"
}
2022-02-16 17:56:18 +00:00
resource "nomad_job" "whoami" {
hcl2 {
enabled = true
vars = {
2022-03-22 04:26:04 +00:00
"count" = "${2 * length(data.consul_service.nomad.service)}",
}
2022-02-16 17:56:18 +00:00
}
jobspec = file("${path.module}/whoami.nomad")
}
2022-03-14 22:58:47 +00:00
resource "consul_config_entry" "global_access" {
name = "*"
kind = "service-intentions"
config_json = jsonencode({
Sources = [
{
Action = "allow"
Name = "traefik"
Precedence = 6
Type = "consul"
},
{
Action = "deny"
Name = "*"
Precedence = 5
Type = "consul"
},
]
})
}