Skip to content

Commit dbe14df

Browse files
authored
Add plan storage option for storing Terraform plan files (#107)
1 parent c441d98 commit dbe14df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ inputs:
6767
description: "Set to 'true' to create a PR comment with the summary of the plan"
6868
required: false
6969
default: 'false'
70+
plan-storage:
71+
description: "Enable plan storage. Default: 'true'. Set to 'false' to disable plan storage."
72+
required: false
73+
default: 'true'
7074
outputs:
7175
summary:
7276
description: "Summary"
@@ -448,7 +452,7 @@ runs:
448452
mask-aws-account-id: "no"
449453

450454
- name: Store New Plan
451-
if: ${{ steps.atmos-plan.outputs.error == 'false' }}
455+
if: ${{ steps.atmos-plan.outputs.error == 'false' && inputs.plan-storage == 'true'}}
452456
uses: cloudposse/github-action-terraform-plan-storage@v1
453457
with:
454458
action: storePlan
@@ -467,7 +471,7 @@ runs:
467471
bucketName: ${{ fromJson(steps.atmos-settings.outputs.settings).terraform-state-bucket }}
468472

469473
- name: Store Lockfile for New Plan
470-
if: ${{ steps.atmos-plan.outputs.error == 'false' }}
474+
if: ${{ steps.atmos-plan.outputs.error == 'false' && inputs.plan-storage == 'true'}}
471475
uses: cloudposse/github-action-terraform-plan-storage@v1
472476
with:
473477
action: storePlan

0 commit comments

Comments
 (0)