Skip to content

Commit

Permalink
feat/fix(workflow): upgrade terraform action and fix state list (#16)
Browse files Browse the repository at this point in the history
* feat: upgrade terraform action

* fix: use terraform-bin to solve output issues

See [this issue](hashicorp/setup-terraform#167) for an explanation.
  • Loading branch information
lentidas authored Sep 6, 2022
1 parent 5f093dd commit 4219080
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/terraform_automatic_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2

- name: Run terraform fmt -check
id: fmt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform_automatic_plan_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2

- name: Run terraform init
id: init
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform_manual_plan_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2

- name: Run terraform init
id: init
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terraform_schedule_plan_destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2

- name: Run terraform init
id: init
Expand All @@ -29,7 +29,7 @@ jobs:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}

- name: Delete some resources on the state file
run: terraform state rm $(terraform state list | grep 'argocd_application\|argocd_project\|kubernetes_\|helm_')
run: terraform state rm $(terraform-bin state list | grep 'argocd_application\|argocd_project\|kubernetes_\|helm_')
continue-on-error: true # This is to avoid failed workflows and the consequent noise when the scheduled destroy runs on the days we have not created the test deployment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 4219080

Please sign in to comment.