Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Commit 7c89a19

Browse files
authored
Merge pull request #11 from lechuk47/plan_no_lock
Fix locking issue + validation improvement + bumps
2 parents c5fc9a9 + 8cc57a2 commit 7c89a19

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV HOME="/home/app" \
1111

1212
# CDKTF and Terraform versions and other related variables
1313
ENV TF_VERSION="1.6.6" \
14-
CDKTF_VERSION="0.20.9" \
14+
CDKTF_VERSION="0.20.11" \
1515
NODEJS_VERSION="20" \
1616
JSII_RUNTIME_PACKAGE_CACHE_ROOT=/tmp/jsii-runtime-cache \
1717
DISABLE_VERSION_CHECK=1 \

entrypoint.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ $TERRAFORM_CMD init
4444

4545
if [[ $ACTION == "Apply" ]]; then
4646
if [[ $DRY_RUN == "True" ]]; then
47-
cdktf plan --skip-synth --output "$ER_OUTDIR"
47+
$TERRAFORM_CMD plan -out=plan --lock=false
4848
if [ -f "validate_plan.py" ]; then
4949
$TERRAFORM_CMD show -json "$CDKTF_OUT_DIR"/plan > "$CDKTF_OUT_DIR"/plan.json
5050
python3 validate_plan.py "$CDKTF_OUT_DIR"/plan.json
@@ -59,10 +59,12 @@ if [[ $ACTION == "Apply" ]]; then
5959
fi
6060
elif [[ $ACTION == "Destroy" ]]; then
6161
if [[ $DRY_RUN == "True" ]]; then
62-
$TERRAFORM_CMD plan -destroy
62+
$TERRAFORM_CMD plan -out=plan -destroy --lock=false
63+
if [ -f "validate_plan.py" ]; then
64+
$TERRAFORM_CMD show -json "$CDKTF_OUT_DIR"/plan > "$CDKTF_OUT_DIR"/plan.json
65+
python3 validate_plan.py "$CDKTF_OUT_DIR"/plan.json
66+
fi
6367
elif [[ $DRY_RUN == "False" ]]; then
64-
cdktf destroy \
65-
--auto-approve \
66-
--output "$ER_OUTDIR"
68+
$TERRAFORM_CMD destroy --auto-approve
6769
fi
6870
fi

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)