From ab30e2e98dafee7b86f449a3dd50b55b68f1ddc3 Mon Sep 17 00:00:00 2001 From: pmikus Date: Tue, 6 Jun 2023 11:59:12 +0000 Subject: fix(core): Trap for AWS Signed-off-by: pmikus Change-Id: I14975b21e7f480c3bca5ba6a04514008af219039 --- resources/libraries/bash/function/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'resources') diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index d768e9b66c..44a897ed2b 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -656,7 +656,7 @@ function prepare_topology () { export TF_VAR_testbed_name="${TEST_CODE}" TERRAFORM_MODULE_DIR="terraform-aws-${NODENESS}-${FLAVOR}-c5n" terraform_init || die "Failed to call terraform init." - trap 'terraform_destroy' ERR || { + trap "terraform_destroy" ERR EXIT || { die "Trap attempt failed, please cleanup manually. Aborting!" } terraform_apply || die "Failed to call terraform apply." -- cgit 1.2.3-korg