Skip to content

Commit 4742467

Browse files
committed
adding apply command
1 parent 4bd10f9 commit 4742467

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/pipeline.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,21 @@ jobs:
6060

6161
- name: Terraform Plan
6262
id: plan
63-
run: terraform plan -no-color -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" -var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" -var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_DEV }}"
64-
continue-on-error: true
63+
run: |
64+
terraform plan -no-color -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
65+
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
66+
-var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_DEV }}"
67+
continue-on-error: true
68+
69+
- name: Terraform Plan status
70+
if: steps.plan.outcome == 'failure'
71+
run: exit 1
72+
73+
- name: Terraform Apply
74+
id: apply
75+
run: |
76+
terraform apply -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
77+
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
78+
-var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_DEV }}" \
79+
-auto-approve
80+

0 commit comments

Comments
 (0)