Skip to content

Commit 5aefa96

Browse files
committedDec 21, 2024
debug
1 parent ae40200 commit 5aefa96

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed
 

‎.forgejo/workflows/tofu-issue-deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
DISK_SIZE=$(echo "$ISSUE_BODY" | grep -A 2 'Disk Size' | tail -n 1 | xargs)
2828
CLONE_VM_ID=$(echo "$ISSUE_BODY" | grep -A 2 'Clone VM ID' | tail -n 1 | xargs)
2929
DESCRIPTION=$(echo "$ISSUE_BODY" | grep -A 2 'Description' | tail -n 1 | xargs)
30+
GATEWAY=$(echo "$ISSUE_BODY" | grep -A 2 'Gateway' | tail -n 1 | xargs)
3031
3132
# Determine user_data_file_id
3233
if [ "$NODE_NAME" == "prox" ]; then
@@ -47,6 +48,8 @@ jobs:
4748
echo "DISK_SIZE=$DISK_SIZE" >> $GITHUB_ENV
4849
echo "CLONE_VM_ID=$CLONE_VM_ID" >> $GITHUB_ENV
4950
echo "USER_DATA_FILE_ID=$USER_DATA_FILE_ID" >> $GITHUB_ENV
51+
echo "DESCRIPTION=$DESCRIPTION" >> $GITHUB_ENV
52+
echo "GATEWAY=$GATEWAY" >> $GITHUB_ENV
5053
5154
- name: Generate Terraform File
5255
run: |
@@ -55,7 +58,7 @@ jobs:
5558
node_name = "${{ env.NODE_NAME }}"
5659
vm_id = "${{ env.VM_ID }}"
5760
name = "${{ env.VM_NAME }}"
58-
description = "${{ env.VM_NAME }}"
61+
description = "${{ env.DESCRIPTION }}"
5962
6063
cpu {
6164
cores = "${{ env.CPUS }}"
@@ -86,6 +89,7 @@ jobs:
8689
ip_config {
8790
ipv4 {
8891
address = "dhcp"
92+
gateway = ${{ env.GATEWAY }}
8993
}
9094
}
9195

‎.github/ISSUE_TEMPLATE/deploy-vm.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ body:
1616
attributes:
1717
label: VM Name
1818
placeholder: Enter the name of the VM
19-
description: The name of the virtual machine (e.g., `Plausible`).
19+
description: The name of the virtual machine (e.g., Plausible).
2020
validations:
2121
required: true
2222

@@ -74,21 +74,12 @@ body:
7474
validations:
7575
required: true
7676

77-
- type: input
78-
id: vlan_id
79-
attributes:
80-
label: VLAN ID
81-
placeholder: Enter the VLAN ID
82-
description: The VLAN ID for the network device (e.g., 1 or `null`).
83-
validations:
84-
required: true
85-
8677
- type: input
8778
id: datastore
8879
attributes:
8980
label: Datastore ID
9081
placeholder: Enter the datastore ID
91-
description: Specify the datastore where the VM disk is located (e.g., `Fast2Tb`).
82+
description: Specify the datastore where the VM disk is located (e.g., Fast2Tb).
9283
validations:
9384
required: true
9485

@@ -109,3 +100,27 @@ body:
109100
description: VM to CLone from, Prox = 9996, Pve2 = 9997.
110101
validations:
111102
required: true
103+
104+
- type: markdown
105+
attributes:
106+
value: |
107+
Ones that vary below
108+
109+
110+
- type: input
111+
id: vlan_id
112+
attributes:
113+
label: VLAN ID
114+
placeholder: Enter the VLAN ID
115+
description: The VLAN ID for the network device (e.g., 1 or null).
116+
validations:
117+
required: true
118+
119+
- type: input
120+
id: gateway
121+
attributes:
122+
label: Gateway
123+
placeholder: Enter the Gateway Variable
124+
description: The gateway variable (e.g., var.vlan_gateway or null).
125+
validations:
126+
required: true

0 commit comments

Comments
 (0)
Please sign in to comment.