diff --git a/.forgejo/workflows/tofu-issue-deploy.yml b/.forgejo/workflows/tofu-issue-deploy.yml index b731b03..2aebc68 100644 --- a/.forgejo/workflows/tofu-issue-deploy.yml +++ b/.forgejo/workflows/tofu-issue-deploy.yml @@ -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 } } diff --git a/.github/ISSUE_TEMPLATE/deploy-vm.yml b/.github/ISSUE_TEMPLATE/deploy-vm.yml index da07a81..80cd172 100644 --- a/.github/ISSUE_TEMPLATE/deploy-vm.yml +++ b/.github/ISSUE_TEMPLATE/deploy-vm.yml @@ -1,17 +1,22 @@ name: Deploy Virtual Machine description: Provide details to deploy a new virtual machine. -title: "[VM Deployment] " +title: ":computer: [VM Deployment] " 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 diff --git a/terraform/proxmox/Tester.tf b/terraform/proxmox/Tester.tf deleted file mode 100644 index 59e2676..0000000 --- a/terraform/proxmox/Tester.tf +++ /dev/null @@ -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 - ] - } -}