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 { network_device {
bridge = "vmbr0" bridge = "vmbr0"
{{- if env.VLAN_ID }}
vlan_id = "${{ env.VLAN_ID }}" vlan_id = "${{ env.VLAN_ID }}"
{{- end }}
} }
disk { disk {
@ -88,6 +86,7 @@ jobs:
ip_config { ip_config {
ipv4 { ipv4 {
address = "dhcp" address = "dhcp"
vlan_gateway
} }
} }

View file

@ -1,17 +1,22 @@
name: Deploy Virtual Machine name: Deploy Virtual Machine
description: Provide details to deploy a new 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: labels:
- opentofu - opentofu
assignees: assignees:
- mafyuh - mafyuh
body: 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 - type: input
id: vm_name id: vm_name
attributes: attributes:
label: VM Name label: VM Name
placeholder: Enter the name of the VM 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: validations:
required: true required: true
@ -56,7 +61,7 @@ body:
attributes: attributes:
label: CPU Type label: CPU Type
placeholder: Enter the 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: validations:
required: true required: true
@ -65,7 +70,7 @@ body:
attributes: attributes:
label: Node Name label: Node Name
placeholder: Enter the 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: validations:
required: true required: true
@ -74,16 +79,16 @@ body:
attributes: attributes:
label: VLAN ID label: VLAN ID
placeholder: Enter the 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: validations:
required: false required: true
- type: input - type: input
id: datastore id: datastore
attributes: attributes:
label: Datastore ID label: Datastore ID
placeholder: Enter the 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: validations:
required: true 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
]
}
}