Skip to content

Commit

Permalink
Merge pull request #14 from np5/20240709_fix_workflow
Browse files Browse the repository at this point in the history
Fix the terraform plan → apply check
  • Loading branch information
whoami-np5 authored Jul 10, 2024
2 parents cc3a9a6 + 6390529 commit d110621
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/tf-plan-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: hashicorp/setup-terraform@v3
- name: Install latest terraform version
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.1"
# We do not want the terraform wrapper that is masking the terraform plan -detailed-exitcode.
terraform_wrapper: false

# Initialize a new or existing Terraform working directory by creating initial files,
# loading any remote state, downloading modules, etc.
Expand Down Expand Up @@ -119,7 +121,7 @@ jobs:
terraform-apply:
name: 'Terraform Apply'
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && needs.terraform-plan.outputs.tfplanExitCode == 2
runs-on: ubuntu-latest
needs: [terraform-plan]

Expand All @@ -128,9 +130,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: hashicorp/setup-terraform@v3
- name: Install latest terraform version
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.1"
# We do not want the terraform wrapper. Too much magic.
terraform_wrapper: false

# Initialize a new or existing Terraform working directory by creating initial files,
# loading any remote state, downloading modules, etc.
Expand Down
6 changes: 3 additions & 3 deletions provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ terraform {
}

backend "http" {
address = "https://psumac24-south-carolina.zentral.cloud/api/terraform/backend/starter_kit/"
lock_address = "https://psumac24-south-carolina.zentral.cloud/api/terraform/backend/starter_kit/lock/"
unlock_address = "https://psumac24-south-carolina.zentral.cloud/api/terraform/backend/starter_kit/lock/"
address = "https://psumac24-north-dakota.zentral.cloud/api/terraform/backend/starter_kit/"
lock_address = "https://psumac24-north-dakota.zentral.cloud/api/terraform/backend/starter_kit/lock/"
unlock_address = "https://psumac24-north-dakota.zentral.cloud/api/terraform/backend/starter_kit/lock/"
lock_method = "POST"
unlock_method = "DELETE"
}
Expand Down

0 comments on commit d110621

Please sign in to comment.