tested n8n template

This commit is contained in:
CC
2026-05-22 21:59:40 +01:00
parent 7f84f1b2b6
commit 45a704709a
32 changed files with 1027 additions and 69 deletions

View File

@@ -0,0 +1,17 @@
locals {
vm_data = {
vm_tag_data = {
for k, v in var.instances :
k => {
node_name = v.node_name
vm_name = v.vm_name
tags = v.vm_tags
}
}
}
}
resource "local_file" "vm_data" {
filename = var.filename
content = yamlencode(local.vm_data)
}

View File

@@ -0,0 +1,7 @@
output "filename" {
value = local_file.vm_data.filename
}
output "content" {
value = local_file.vm_data.content
}

View File

@@ -0,0 +1,15 @@
variable "filename" {
description = "Path to write the vm_data.yml file"
type = string
}
variable "instances" {
description = "Normalized instance map keyed by instance key"
type = map(object({
service_name = string
vm_name = string
node_name = string
ipv4_address = string
vm_tags = list(string)
}))
}