Skip to content

Commit

Permalink
Merge pull request #238 from dxw/only-ask-to-delete-default-resources…
Browse files Browse the repository at this point in the history
…-in-interactive-mode

Only ask to delete default resouces in interactive mode
  • Loading branch information
Stretch96 authored Dec 22, 2023
2 parents 01c0351 + 936d6fc commit 23a3e73
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/deploy/account-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ do
STRING_OPTIONS="${OPTIONS[*]}"
"$APP_ROOT/bin/dalmatian" terraform-dependencies run-terraform-command -c "$STRING_OPTIONS" -a -q
TERRAFORM_RESOURCES=$("$APP_ROOT/bin/dalmatian" terraform-dependencies run-terraform-command -a -c "terraform state list" -q)
if echo "$TERRAFORM_RESOURCES" | grep -q "aws_lambda_function.delete_default_resources\[0\]"
if [ "$NON_INTERACTIVE_MODE" == "0" ]
then
if yes_no "Do you want to delete all the Default resources in the AWS account? [y/n]" "y"
if echo "$TERRAFORM_RESOURCES" | grep -q "aws_lambda_function.delete_default_resources\[0\]"
then
"$APP_ROOT/bin/dalmatian" deploy delete-default-resources -a "$workspace"
if yes_no "Do you want to delete all the Default resources in the AWS account? [y/n]" "y"
then
"$APP_ROOT/bin/dalmatian" deploy delete-default-resources -a "$workspace"
fi
fi
fi
fi
Expand Down

0 comments on commit 23a3e73

Please sign in to comment.