Files
TerraHome/.gitea/workflows/terraform-apply.yml
MichaelFisher1997 59fbbb07df
Some checks failed
Terraform Plan / Terraform Plan (push) Failing after 14s
fix: load static token id and validate token secret
- Store non-sensitive Proxmox token id in terraform.tfvars
- Inject only token secret via workflow-generated secrets.auto.tfvars
- Add variable validations for token id format and non-empty token secret
- Add workflow debug output for token secret length and selected token id
2026-02-27 21:00:44 +00:00

42 lines
983 B
YAML

name: Terraform Apply
on:
push:
branches:
- master
jobs:
terraform:
name: "Terraform Apply"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create secrets.tfvars
working-directory: terraform
run: |
cat > secrets.auto.tfvars << EOF
pm_api_token_secret = "${{ secrets.PM_API_TOKEN_SECRET }}"
SSH_KEY_PUBLIC = "${{ secrets.SSH_KEY_PUBLIC }}"
TS_AUTHKEY = "${{ secrets.TS_AUTHKEY }}"
EOF
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.6.6
- name: Terraform Init
working-directory: terraform
run: terraform init
- name: Terraform Plan
working-directory: terraform
run: terraform plan
- name: Terraform Apply
working-directory: terraform
run: terraform apply -auto-approve