Move each service to it's own tf file

This commit is contained in:
2025-05-23 00:43:59 +10:00
parent c1aeb11354
commit 8e586b3352
8 changed files with 189 additions and 204 deletions

42
2-nomad-config/main.tf Normal file
View File

@@ -0,0 +1,42 @@
terraform {
backend "local" {
path = "./.tfstate/terraform.tfstate"
}
}
terraform {
required_providers {
sops = {
source = "carlpett/sops"
version = "~> 0.5"
}
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5"
}
postgresql = {
source = "cyrilgdn/postgresql"
}
}
}
provider "nomad" {
address = "http://jaglan-beta-m01.othrayte.one:4646"
}
data "sops_file" "secrets" {
source_file = "secrets.enc.json"
}
provider "cloudflare" {
api_token = data.sops_file.secrets.data["cloudflare.api_token"]
}
resource "nomad_job" "csi-smb" {
jobspec = file("csi-smb.nomad.hcl")
}
data "nomad_plugin" "smb" {
plugin_id = "smb"
wait_for_healthy = true
}