debug
All checks were successful
OpenTofu Automation / deploy (push) Successful in 13s

This commit is contained in:
Matt Reeves 2024-12-21 00:32:00 -05:00
parent 7f62aeadc3
commit 0e8b685d55
3 changed files with 13 additions and 61 deletions

View file

@ -69,9 +69,7 @@ jobs:
network_device {
bridge = "vmbr0"
{{- if env.VLAN_ID }}
vlan_id = "${{ env.VLAN_ID }}"
{{- end }}
}
disk {
@ -88,6 +86,7 @@ jobs:
ip_config {
ipv4 {
address = "dhcp"
vlan_gateway
}
}

View file

@ -1,17 +1,22 @@
name: Deploy Virtual Machine
description: Provide details to deploy a new virtual machine.
title: "[VM Deployment] <VM Name>"
title: ":computer: [VM Deployment] <put VM Name here>"
labels:
- opentofu
assignees:
- mafyuh
body:
- type: markdown
attributes:
value: |
Quickly create Virtual Machines and let Actions take care of provisoning. Use `null` for any values you dont want
- type: input
id: vm_name
attributes:
label: VM Name
placeholder: Enter the name of the VM
description: The name of the virtual machine (e.g., Plausible).
description: The name of the virtual machine (e.g., `Plausible`).
validations:
required: true
@ -56,7 +61,7 @@ body:
attributes:
label: CPU Type
placeholder: Enter the CPU type
description: The type of CPU to use (e.g., host).
description: The type of CPU to use (e.g., `host`).
validations:
required: true
@ -65,7 +70,7 @@ body:
attributes:
label: Node Name
placeholder: Enter the node name
description: The Proxmox node name (e.g., prox or pve2).
description: The Proxmox node name (e.g., `prox`` or `pve2`).
validations:
required: true
@ -74,16 +79,16 @@ body:
attributes:
label: VLAN ID
placeholder: Enter the VLAN ID
description: The VLAN ID for the network device (e.g., 1).
description: The VLAN ID for the network device (e.g., 1 or `null`).
validations:
required: false
required: true
- type: input
id: datastore
attributes:
label: Datastore ID
placeholder: Enter the datastore ID
description: Specify the datastore where the VM disk is located (e.g., Fast2Tb).
description: Specify the datastore where the VM disk is located (e.g., `Fast2Tb`).
validations:
required: true

View file

@ -1,52 +0,0 @@
resource "proxmox_virtual_environment_vm" "Tester" {
node_name = "prox"
vm_id = "6568"
name = "Tester"
description = "Tester"
cpu {
cores = "2"
type = "host"
architecture = "x86_64"
}
memory {
dedicated = "2048"
}
network_device {
bridge = "vmbr0"
{{- if env.VLAN_ID }}
vlan_id = "_No response_"
{{- end }}
}
disk {
datastore_id = "Fast2Tb"
size = "20"
interface = "scsi0"
}
clone {
vm_id = "9996"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config.id
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
initialization[0].user_data_file_id
]
}
}