Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the terraform plan → apply check #14

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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