Skip to content

Commit c837e8b

Browse files
committed
Refactor Terraform workflow to streamline apply step and remove redundant job
1 parent 82f42c4 commit c837e8b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/terraform.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,11 @@ jobs:
5353
run: terraform plan
5454
working-directory: ./Terraform
5555

56-
57-
terraform-apply:
58-
name: Terraform Apply
59-
needs: terraform
60-
runs-on: ubuntu-latest
61-
environment: production # <-- This triggers manual approval
62-
steps:
6356
- name: Terraform Apply
57+
id: terraform-action
58+
if: ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
6459
run: terraform apply -auto-approve
60+
working-directory: ./Terraform
6561

6662
- name: Get Terraform outputs
6763
id: terraform-outputs

0 commit comments

Comments
 (0)