diff --git a/.gitea/workflows/ci-test.yaml b/.gitea/workflows/ci-test.yaml index edbd057..9f70113 100644 --- a/.gitea/workflows/ci-test.yaml +++ b/.gitea/workflows/ci-test.yaml @@ -29,12 +29,18 @@ jobs: path: infra/secrets - name: Init OpenTofu - working-directory: infra + working-directory: infra/iac run: tofu init - name: Plan - working-directory: infra - run: tofu plan -out=tfplan + working-directory: infra/iac + 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 working-directory: infra @@ -45,5 +51,11 @@ jobs: - name: Apply - working-directory: infra - run: tofu apply -auto-approve tfplan \ No newline at end of file + working-directory: infra/iac + 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 \ No newline at end of file diff --git a/main.tf b/main.tf index 238d0b0..e32fcc7 100644 --- a/main.tf +++ b/main.tf @@ -17,4 +17,4 @@ terraform { } } -provider "random" {} +provider "random" {} \ No newline at end of file