diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml index b8ca3d6..2064bec 100644 --- a/.github/workflows/terraform.yaml +++ b/.github/workflows/terraform.yaml @@ -2,39 +2,33 @@ name: Terraform CI/CD on: push: - branches: - - "**" pull_request: jobs: terraform: - runs-on: ssot + runs-on: ssot-runner + + container: + image: hashicorp/terraform:1.6.6 steps: + - name: Install dependencies + run: | + apk add --no-cache nodejs npm git + - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Terraform - uses: hashicorp/setup-terraform@v3 - with: - terraform_version: 1.6.6 - - name: Terraform Init run: terraform init -input=false - - name: Terraform Format - run: terraform fmt -check -recursive - - name: Terraform Validate run: terraform validate - name: Terraform Plan - run: | - terraform plan \ - -input=false \ - -out=tfplan + run: terraform plan -input=false -out=tfplan - - name: Show Terraform Plan + - name: Show plan run: terraform show -no-color tfplan > plan.txt - name: Upload plan artifact