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

This commit is contained in:
Matt Reeves 2024-12-21 00:13:06 -05:00
parent 6df4372996
commit 9638fbc4c4
4 changed files with 24 additions and 79 deletions

View file

@ -26,6 +26,7 @@ jobs:
DATASTORE=$(echo "$ISSUE_BODY" | grep -A 2 'Datastore ID' | tail -n 1 | xargs)
DISK_SIZE=$(echo "$ISSUE_BODY" | grep -A 2 'Disk Size' | tail -n 1 | xargs)
CLONE_VM_ID=$(echo "$ISSUE_BODY" | grep -A 2 'Clone VM ID' | tail -n 1 | xargs)
DESCRIPTION=$(echo "$ISSUE_BODY" | grep -A 2 'Description' | tail -n 1 | xargs)
# Determine user_data_file_id
if [ "$NODE_NAME" == "prox" ]; then
@ -59,6 +60,7 @@ jobs:
cpu {
cores = "${{ env.CPUS }}"
type = "${{ env.SCPU_TYPE }}"
architecture = "x86_64"
}
memory {
@ -67,12 +69,15 @@ jobs:
network_device {
bridge = "vmbr0"
{{- if env.VLAN_ID }}
vlan_id = "${{ env.VLAN_ID }}"
{{- end }}
}
disk {
datastore_id = "${{ env.DATASTORE }}"
size = "${{ env.DISK_SIZE }}"
interface = "scsi0"
}
clone {
@ -88,6 +93,15 @@ jobs:
user_data_file_id = ${{ env.USER_DATA_FILE_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
]
}
}
EOF

View file

@ -14,6 +14,15 @@ body:
description: The name of the virtual machine (e.g., Plausible).
validations:
required: true
- type: input
id: description
attributes:
label: Description
placeholder: Enter the VM Description
description: Enter the VM Description
validations:
required: true
- type: input
id: vm_id
@ -67,7 +76,7 @@ body:
placeholder: Enter the VLAN ID
description: The VLAN ID for the network device (e.g., 1).
validations:
required: true
required: false
- type: input
id: datastore

View file

@ -1,39 +0,0 @@
resource "proxmox_virtual_environment_vm" "Test" {
node_name = "prox"
vm_id = "5656"
name = "Test"
description = "Test"
cpu {
cores = "2"
type = "host"
}
memory {
dedicated = "2048"
}
network_device {
bridge = "vmbr0"
vlan_id = "1"
}
disk {
datastore_id = "Fast2Tb"
size = "20"
}
clone {
vm_id = "9996"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config.id
}
}

View file

@ -1,39 +0,0 @@
resource "proxmox_virtual_environment_vm" "test" {
node_name = "prox"
vm_id = "9996"
name = "test"
description = "test"
cpu {
cores = "2"
type = "host"
}
memory {
dedicated = "2048"
}
network_device {
bridge = "vmbr0"
vlan_id = "1"
}
disk {
datastore_id = "Fast2Tb"
size = "20"
}
clone {
vm_id = "9996"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config.id
}
}