This commit is contained in:
Tomás Limpinho
2025-08-18 22:10:53 +01:00
2 changed files with 18 additions and 6 deletions

View File

@ -29,12 +29,18 @@ jobs:
path: infra/secrets path: infra/secrets
- name: Init OpenTofu - name: Init OpenTofu
working-directory: infra working-directory: infra/iac
run: tofu init run: tofu init
- name: Plan - name: Plan
working-directory: infra working-directory: infra/iac
run: tofu plan -out=tfplan run: |
# Find all .auto.tfvars in the secrets folder
VAR_FILES=""
for f in ../secrets/secrets/*.auto.tfvars; do
VAR_FILES="$VAR_FILES -var-file=$f"
done
tofu plan $VAR_FILES -out=tfplan
- name: Export tfplan - name: Export tfplan
working-directory: infra working-directory: infra
@ -45,5 +51,11 @@ jobs:
- name: Apply - name: Apply
working-directory: infra working-directory: infra/iac
run: tofu apply -auto-approve tfplan run: |
# Find all .auto.tfvars in the secrets folder
VAR_FILES=""
for f in ../secrets/secrets/*.auto.tfvars; do
VAR_FILES="$VAR_FILES -var-file=$f"
done
tofu apply $VAR_FILES -auto-approve tfplan