From 5aefa9631aa4f7b5ec94c902d5ae8ad1432def8d Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Sat, 21 Dec 2024 01:00:19 -0500 Subject: [PATCH] debug --- .forgejo/workflows/tofu-issue-deploy.yml | 6 +++- .github/ISSUE_TEMPLATE/deploy-vm.yml | 37 +++++++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.forgejo/workflows/tofu-issue-deploy.yml b/.forgejo/workflows/tofu-issue-deploy.yml index 3bf95b0..0b32cd2 100644 --- a/.forgejo/workflows/tofu-issue-deploy.yml +++ b/.forgejo/workflows/tofu-issue-deploy.yml @@ -27,6 +27,7 @@ jobs: 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) + GATEWAY=$(echo "$ISSUE_BODY" | grep -A 2 'Gateway' | tail -n 1 | xargs) # Determine user_data_file_id if [ "$NODE_NAME" == "prox" ]; then @@ -47,6 +48,8 @@ jobs: echo "DISK_SIZE=$DISK_SIZE" >> $GITHUB_ENV echo "CLONE_VM_ID=$CLONE_VM_ID" >> $GITHUB_ENV echo "USER_DATA_FILE_ID=$USER_DATA_FILE_ID" >> $GITHUB_ENV + echo "DESCRIPTION=$DESCRIPTION" >> $GITHUB_ENV + echo "GATEWAY=$GATEWAY" >> $GITHUB_ENV - name: Generate Terraform File run: | @@ -55,7 +58,7 @@ jobs: node_name = "${{ env.NODE_NAME }}" vm_id = "${{ env.VM_ID }}" name = "${{ env.VM_NAME }}" - description = "${{ env.VM_NAME }}" + description = "${{ env.DESCRIPTION }}" cpu { cores = "${{ env.CPUS }}" @@ -86,6 +89,7 @@ jobs: ip_config { ipv4 { address = "dhcp" + gateway = ${{ env.GATEWAY }} } } diff --git a/.github/ISSUE_TEMPLATE/deploy-vm.yml b/.github/ISSUE_TEMPLATE/deploy-vm.yml index 80cd172..e24fd0f 100644 --- a/.github/ISSUE_TEMPLATE/deploy-vm.yml +++ b/.github/ISSUE_TEMPLATE/deploy-vm.yml @@ -16,7 +16,7 @@ body: 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 @@ -74,21 +74,12 @@ body: validations: required: true - - type: input - id: vlan_id - attributes: - label: VLAN ID - placeholder: Enter the VLAN ID - description: The VLAN ID for the network device (e.g., 1 or `null`). - validations: - 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 @@ -109,3 +100,27 @@ body: description: VM to CLone from, Prox = 9996, Pve2 = 9997. validations: required: true + + - type: markdown + attributes: + value: | + Ones that vary below + + + - type: input + id: vlan_id + attributes: + label: VLAN ID + placeholder: Enter the VLAN ID + description: The VLAN ID for the network device (e.g., 1 or null). + validations: + required: true + + - type: input + id: gateway + attributes: + label: Gateway + placeholder: Enter the Gateway Variable + description: The gateway variable (e.g., var.vlan_gateway or null). + validations: + required: true \ No newline at end of file