Files
N8N/terraform/variables.tf

67 lines
2.0 KiB
Terraform
Raw Normal View History

2026-05-20 22:26:32 +00:00
variable "instance_mode" {
2026-05-21 16:20:22 +01:00
type = string
description = "single or multiple"
validation {
condition = contains(["single", "multiple"], var.instance_mode)
error_message = "instance_mode must be either single or multiple."
}
2026-05-20 22:26:32 +00:00
}
variable "instance" {
type = object({
2026-05-21 16:20:22 +01:00
service_name = string
vm_name = string
node_name = string
vm_cpu = optional(number)
vm_ram = optional(number)
vm_size = optional(string)
vm_tags = optional(list(string))
2026-05-20 22:26:32 +00:00
})
2026-05-21 16:20:22 +01:00
default = null
nullable = true
description = "Used only when instance_mode = single."
2026-05-20 22:26:32 +00:00
}
variable "instances" {
type = map(object({
2026-05-21 16:20:22 +01:00
service_name = string
vm_name = string
node_name = string
vm_cpu = optional(number)
vm_ram = optional(number)
vm_size = optional(string)
vm_tags = optional(list(string))
2026-05-20 22:26:32 +00:00
}))
2026-05-21 16:20:22 +01:00
default = {}
nullable = false
description = "Used only when instance_mode = multiple."
2026-05-20 22:26:32 +00:00
}
2026-05-21 16:20:22 +01:00
2026-05-20 22:26:32 +00:00
variable "vm_defaults" {
type = object({
node_datastore = string
vm_bios = string
vm_machine = string
vm_user_sshkey = string
bridge = string
vm_cpu = number
vm_ram = number
2026-05-20 23:50:01 +01:00
vm_size = number
2026-05-20 22:26:32 +00:00
})
default = {
node_datastore = "hlst"
vm_bios = "ovmf"
vm_machine = "q35"
2026-05-20 23:47:43 +01:00
vm_user_sshkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRlWaLBt/qmWY01Cd6jN/YxLnlT+6lg+evEdN/dIajirdTj1rCbAdlG3WYvo+4BpN17HK3/eGQpGUMbgI/8MVd8YPODcD34gaNX0w2v66BwHx+S6BZUpz5T2IoQT0JtSv/TtFICoff5gXdNRpfd4eWsmTioEqLA6oToJLE4dn3jvAzFi9y7fyLqvuoQMmPidYYJjGT30eiULtXNspoEP+GmuWmVEu+znzMWaKDWKdOsii4Cv1aWCRKSDDRzDBrZI2mP+Vm4HDQBdgDYRw4ehumMDtfaSjyJCnrk691bIM+wxzICuIEecg5kq5HcUPvo2mFyWPAEXb5xlXnuopYEBd7 Generated By NeoServer"
2026-05-20 22:26:32 +00:00
bridge = "vmbr0"
2026-05-20 23:58:27 +01:00
vm_cpu = 2
vm_ram = 4096
2026-05-20 23:50:01 +01:00
vm_size = 20
2026-05-20 22:26:32 +00:00
}
}
2026-05-20 23:47:43 +01:00
variable "pm_api_url" { default = "https://192.168.10.201:8006/api2/json" }
variable "pm_api_token" { default = "terraform@pve!provider=760580c4-5c1f-462b-986a-dd244c6c95f2" }