Skip to content

Commit

Permalink
end test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hermann90 committed Nov 5, 2024
1 parent 1db1eb7 commit 383067e
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
branches:
- main

env:
TF_VERSION: "1.5.0"
TF_WORKING_DIR: "./terraform" # Adjust to your Terraform directory
# env:
# TF_VERSION: "1.5.0"
# TF_WORKING_DIR: "./terraform" # Adjust to your Terraform directory

jobs:
format:
Expand All @@ -20,13 +20,13 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ env.TF_VERSION }}
# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v2
# with:
# terraform_version: ${{ env.TF_VERSION }}

- name: Run Terraform Format
run: terraform fmt -check -recursive
run: echo "step 1"

validate:
name: Terraform Validate
Expand All @@ -36,14 +36,14 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ env.TF_VERSION }}
# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v2
# with:
# terraform_version: ${{ env.TF_VERSION }}

- name: Run Terraform Validate
working-directory: ${{ env.TF_WORKING_DIR }}
run: terraform validate
run: echo "step 2"

plan:
name: Terraform Plan
Expand All @@ -53,22 +53,26 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ env.TF_VERSION }}

- name: Terraform Init
- name: Run Terraform Validate
working-directory: ${{ env.TF_WORKING_DIR }}
run: terraform init -input=false
run: echo "step 3"

- name: Terraform Plan
working-directory: ${{ env.TF_WORKING_DIR }}
run: terraform plan -out=tfplan.binary
# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v2
# with:
# terraform_version: ${{ env.TF_VERSION }}

- name: Show Terraform Plan
working-directory: ${{ env.TF_WORKING_DIR }}
run: terraform show -no-color tfplan.binary
# - name: Terraform Init
# working-directory: ${{ env.TF_WORKING_DIR }}
# run: terraform init -input=false

# - name: Terraform Plan
# working-directory: ${{ env.TF_WORKING_DIR }}
# run: terraform plan -out=tfplan.binary

# - name: Show Terraform Plan
# working-directory: ${{ env.TF_WORKING_DIR }}
# run: terraform show -no-color tfplan.binary

manual-approval:
name: Manual Approval Before Apply
Expand Down

0 comments on commit 383067e

Please sign in to comment.