generated from CC/VMServiceTemplate
ci/cd roles
This commit is contained in:
@@ -40,12 +40,12 @@ module "vm-n8n" {
|
|||||||
|
|
||||||
module "inventory" {
|
module "inventory" {
|
||||||
source = "./modules/proxmox_ansible_inventory"
|
source = "./modules/proxmox_ansible_inventory"
|
||||||
filename = "${abspath("${path.root}/..")}/ansible/inventory/inventory.yml"
|
filename = "${path.root}/ansible/inventory/inventory.yml"
|
||||||
instances = local.vm_created
|
instances = local.vm_created
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vm_data" {
|
module "vm_data" {
|
||||||
source = "./modules/proxmox_vm_data"
|
source = "./modules/proxmox_vm_data"
|
||||||
filename = "${abspath("${path.root}/..")}/terraform/vm_data.yml"
|
filename = "${path.root}/terraform/vm_data.yml"
|
||||||
instances = local.vm_created
|
instances = local.vm_created
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
variable "instance_mode" {
|
variable "instance_mode" {
|
||||||
type = string
|
type = string
|
||||||
default = "single"
|
description = "single or multiple"
|
||||||
|
|
||||||
|
validation {
|
||||||
|
condition = contains(["single", "multiple"], var.instance_mode)
|
||||||
|
error_message = "instance_mode must be either single or multiple."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "instance" {
|
variable "instance" {
|
||||||
description = "Single instance definition"
|
|
||||||
type = object({
|
type = object({
|
||||||
service_name = string
|
service_name = string
|
||||||
vm_name = string
|
vm_name = string
|
||||||
@@ -12,15 +16,14 @@ variable "instance" {
|
|||||||
vm_cpu = optional(number)
|
vm_cpu = optional(number)
|
||||||
vm_ram = optional(number)
|
vm_ram = optional(number)
|
||||||
vm_size = optional(string)
|
vm_size = optional(string)
|
||||||
app_port = number
|
|
||||||
app_image = string
|
|
||||||
vm_tags = optional(list(string))
|
vm_tags = optional(list(string))
|
||||||
})
|
})
|
||||||
default = null
|
default = null
|
||||||
|
nullable = true
|
||||||
|
description = "Used only when instance_mode = single."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "instances" {
|
variable "instances" {
|
||||||
description = "Multiple instance definitions"
|
|
||||||
type = map(object({
|
type = map(object({
|
||||||
service_name = string
|
service_name = string
|
||||||
vm_name = string
|
vm_name = string
|
||||||
@@ -28,13 +31,14 @@ variable "instances" {
|
|||||||
vm_cpu = optional(number)
|
vm_cpu = optional(number)
|
||||||
vm_ram = optional(number)
|
vm_ram = optional(number)
|
||||||
vm_size = optional(string)
|
vm_size = optional(string)
|
||||||
app_port = number
|
|
||||||
app_image = string
|
|
||||||
vm_tags = optional(list(string))
|
vm_tags = optional(list(string))
|
||||||
}))
|
}))
|
||||||
default = {}
|
default = {}
|
||||||
|
nullable = false
|
||||||
|
description = "Used only when instance_mode = multiple."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
variable "vm_defaults" {
|
variable "vm_defaults" {
|
||||||
type = object({
|
type = object({
|
||||||
node_datastore = string
|
node_datastore = string
|
||||||
|
|||||||
Reference in New Issue
Block a user