Skip to content

Commit a2fb1e8

Browse files
committed
Merge branch 'main' into feature/CCM-8744_prevent-concurrent-sessions
2 parents d293439 + 31e95ce commit a2fb1e8

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/pr_destroy_dynamic_env.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
"targetAccountGroup", $targetAccountGroup,
3636
"targetComponent", $targetComponent,
3737
"terraformAction", $terraformAction,
38-
"overrides", $overrides,
3938
}
4039
}')
4140

infrastructure/terraform/bin/terraform.sh

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -539,24 +539,26 @@ fi;
539539
[ -f "${dynamic_file_path}" ] && tf_var_file_paths+=("${dynamic_file_path}");
540540

541541
# Warn on duplication
542-
duplicate_variables="$(cat "${tf_var_file_paths[@]}" | sed -n -e 's/\(^[a-zA-Z0-9_\-]\+\)\s*=.*$/\1/p' | sort | uniq -d)";
543-
[ -n "${duplicate_variables}" ] \
544-
&& echo -e "
545-
###################################################################
546-
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING #
547-
###################################################################
548-
The following input variables appear to be duplicated:
549-
550-
${duplicate_variables}
551-
552-
This could lead to unexpected behaviour. Overriding of variables
553-
has previously been unpredictable and is not currently supported,
554-
but it may work.
555-
556-
Recent changes to terraform might give you useful overriding and
557-
map-merging functionality, please use with caution and report back
558-
on your successes & failures.
559-
###################################################################";
542+
if [ ${#tf_var_file_paths[@]} -gt 0 ]; then
543+
duplicate_variables="$(cat "${tf_var_file_paths[@]}" | sed -n -e 's/\(^[a-zA-Z0-9_\-]\+\)\s*=.*$/\1/p' | sort | uniq -d)";
544+
[ -n "${duplicate_variables}" ] \
545+
&& echo -e "
546+
###################################################################
547+
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING #
548+
###################################################################
549+
The following input variables appear to be duplicated:
550+
551+
${duplicate_variables}
552+
553+
This could lead to unexpected behaviour. Overriding of variables
554+
has previously been unpredictable and is not currently supported,
555+
but it may work.
556+
557+
Recent changes to terraform might give you useful overriding and
558+
map-merging functionality, please use with caution and report back
559+
on your successes & failures.
560+
###################################################################";
561+
fi
560562

561563
# Build up the tfvars arguments for terraform command line
562564
for file_path in "${tf_var_file_paths[@]}"; do

0 commit comments

Comments
 (0)