fix: update tofu 2

This commit is contained in:
2026-07-29 16:36:35 +02:00
parent ec55dc8437
commit 3206f47567
+9 -16
View File
@@ -2,26 +2,25 @@ name: Reusable OpenTofu Deploy Template
on:
workflow_call:
inputs:
vm_id:
required: true
proxmox_endpoint:
description: "The URL endpoint for the Proxmox API"
type: string
ip_address:
default: "https://212.3.125.242:8006/"
secrets:
PROXMOX_VE_API_TOKEN:
description: "The API token for Proxmox authentication"
required: true
type: string
hostname:
required: true
type: string
jobs:
deploy-to-proxmox:
runs-on: ubuntu-latest
env:
# Proxmox Auth (Pulled from Org-level secrets)
PROXMOX_VE_ENDPOINT: ${{ secrets.PROXMOX_VE_ENDPOINT }}
# Proxmox Auth (Endpoint from inputs, Token from explicit secrets)
PROXMOX_VE_ENDPOINT: ${{ inputs.proxmox_endpoint }}
PROXMOX_VE_API_TOKEN: ${{ secrets.PROXMOX_VE_API_TOKEN }}
PROXMOX_VE_INSECURE: "true"
# Gitea State Backend Configuration
# Gitea Remote State Backend (Dynamic per-repository package)
TF_HTTP_ADDRESS: "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/terraform/state/${{ gitea.event.repository.name }}"
TF_HTTP_LOCK_ADDRESS: "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/terraform/state/${{ gitea.event.repository.name }}/lock"
TF_HTTP_UNLOCK_ADDRESS: "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/terraform/state/${{ gitea.event.repository.name }}/lock"
@@ -30,12 +29,6 @@ jobs:
TF_HTTP_USERNAME: ${{ gitea.actor }}
TF_HTTP_PASSWORD: ${{ secrets.GITEA_TOKEN }}
# VM Variables
TF_VAR_vm_id: ${{ inputs.vm_id }}
TF_VAR_ip_address: ${{ inputs.ip_address }}
TF_VAR_hostname: ${{ inputs.hostname }}
TF_VAR_ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }} # (From Org-level)
steps:
- name: Checkout Code
uses: actions/checkout@v4