Skip to content

Commit 9c22b31

Browse files
committed
[FIX #337] support terraform plan -refresh=false
1 parent 4c44848 commit 9c22b31

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

image/actions.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ function set-common-plan-args() {
357357
PLAN_ARGS="$PLAN_ARGS -destroy"
358358
fi
359359
fi
360+
361+
if [[ -v INPUT_REFRESH ]]; then
362+
if [[ "$INPUT_REFRESH" == "false" ]]; then
363+
PLAN_ARGS="$PLAN_ARGS -refresh=false"
364+
fi
365+
fi
360366
}
361367

362368
function set-variable-args() {

terraform-plan/action.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ inputs:
4545
description: Create a plan to destroy all resources
4646
required: false
4747
default: "false"
48+
refresh:
49+
description: Skip checking for external changes to remote objects while creating the plan
50+
required: false
51+
default: "true"
4852
label:
4953
description: A friendly name for this plan
5054
required: false

tofu-plan/action.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ inputs:
4545
description: Create a plan to destroy all resources
4646
required: false
4747
default: "false"
48+
refresh:
49+
description: Skip checking for external changes to remote objects while creating the plan
50+
required: false
51+
default: "true"
4852
label:
4953
description: A friendly name for this plan
5054
required: false

0 commit comments

Comments
 (0)