Add Terraform plan step with artifact upload
Some checks failed
Code Quality & Security Scan / TFLint (push) Successful in 26s
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 28s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 35s
Code Quality & Security Scan / SonarQube Trigger (push) Successful in 38s
Code Quality & Security Scan / Terraform Init (push) Has been cancelled

- Added terraform plan step that outputs plan to tfplan file
- Plan includes all required environment variables for Vault and MinIO
- Plan artifact uploaded with 30-day retention for later apply step
- Plan file can be downloaded and used for terraform apply
This commit is contained in:
Patrick de Ruiter 2025-11-02 00:48:46 +01:00
parent 72c8be1a56
commit 269c9b48d7
Signed by: pderuiter
GPG Key ID: 5EBA7F21CF583321

View File

@ -114,3 +114,19 @@ jobs:
-backend-config="skip_requesting_account_id=true" \
-backend-config="skip_region_validation=true" \
-backend-config="use_path_style=true"
- name: Terraform Plan
env:
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_KEY }}
TF_VAR_role_id: ${{ secrets.VAULT_ROLE_ID }}
TF_VAR_secret_id: ${{ secrets.VAULT_SECRET_ID }}
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
run: terraform plan -out=tfplan
- name: Upload Terraform Plan
uses: actions/upload-artifact@v4
with:
name: terraform-plan
path: tfplan
retention-days: 30