Skip to content

Commit fc0582c

Browse files
authored
Merge branch 'master' into issue-437
2 parents cde7dc4 + 34ad4f7 commit fc0582c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/tfdrift.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ on:
3636
GITHUB:
3737
required: true
3838
description: 'PAT of the user to run the jobs.'
39+
TF_API_TOKEN:
40+
required: false
41+
description: 'Terraform cloud token if your backend is terraform cloud.'
3942
jobs:
4043
terraform-plan:
4144
name: 'Terraform Plan'
@@ -86,6 +89,7 @@ jobs:
8689
tf_actions_working_dir: ${{ inputs.working_directory }}
8790
env:
8891
GITHUB_TOKEN: '${{ secrets.GITHUB }}'
92+
TF_CLI_ARGS: "-backend-config=token=${{ secrets.TF_API_TOKEN }}"
8993

9094
# Generates an execution plan for Terraform
9195
# An exit code of 0 indicated no changes, 1 a terraform failure, 2 there are pending changes.
@@ -223,4 +227,4 @@ jobs:
223227
- name: Error on Failure
224228
if: steps.tf-plan.outputs.exitcode == 2
225229
run: exit 1
226-
230+

0 commit comments

Comments
 (0)