Loading templates/gitlab-ci-terraform.yml +12 −11 Original line number Diff line number Diff line Loading @@ -285,6 +285,7 @@ stages: extra_opts=$2 log_info "--- \\e[32minit\\e[0m" log_info "--- Positioned environment (can also be used as TF vars):" # shellcheck disable=SC2154 log_info "--- environment_type: \\e[33;1m${environment_type}\\e[0m" # shellcheck disable=SC2154 Loading Loading @@ -408,17 +409,6 @@ stages: terraform show --json "$tf_plan" | jq -r '([.resource_changes[]?.change.actions?]|flatten)|{"create":(map(select(.=="create"))|length),"update":(map(select(.=="update"))|length),"delete":(map(select(.=="delete"))|length)}' > "$gitlab_report" } tf_infracost() { # shellcheck disable=SC2154 log_info "--- \\e[32minfracost\\e[0m" if [[ "${TF_INFACOST_USAGE_FILE}" ]];then tf_usagefile="--sync-usage-file --usage-file ${TF_INFACOST_USAGE_FILE}" fi # shellcheck disable=SC2086 infracost ${TF_INFRACOST_ARGS} ${tf_usagefile} --path . } function tf_apply() { opts=$1 extra_opts=$2 Loading Loading @@ -521,6 +511,17 @@ stages: fi } tf_infracost() { # shellcheck disable=SC2154 log_info "--- \\e[32minfracost\\e[0m" if [[ "${TF_INFACOST_USAGE_FILE}" ]];then tf_usagefile="--sync-usage-file --usage-file ${TF_INFACOST_USAGE_FILE}" fi # shellcheck disable=SC2086 infracost ${TF_INFRACOST_ARGS} ${tf_usagefile} --path . } unscope_variables eval_secrets Loading Loading
templates/gitlab-ci-terraform.yml +12 −11 Original line number Diff line number Diff line Loading @@ -285,6 +285,7 @@ stages: extra_opts=$2 log_info "--- \\e[32minit\\e[0m" log_info "--- Positioned environment (can also be used as TF vars):" # shellcheck disable=SC2154 log_info "--- environment_type: \\e[33;1m${environment_type}\\e[0m" # shellcheck disable=SC2154 Loading Loading @@ -408,17 +409,6 @@ stages: terraform show --json "$tf_plan" | jq -r '([.resource_changes[]?.change.actions?]|flatten)|{"create":(map(select(.=="create"))|length),"update":(map(select(.=="update"))|length),"delete":(map(select(.=="delete"))|length)}' > "$gitlab_report" } tf_infracost() { # shellcheck disable=SC2154 log_info "--- \\e[32minfracost\\e[0m" if [[ "${TF_INFACOST_USAGE_FILE}" ]];then tf_usagefile="--sync-usage-file --usage-file ${TF_INFACOST_USAGE_FILE}" fi # shellcheck disable=SC2086 infracost ${TF_INFRACOST_ARGS} ${tf_usagefile} --path . } function tf_apply() { opts=$1 extra_opts=$2 Loading Loading @@ -521,6 +511,17 @@ stages: fi } tf_infracost() { # shellcheck disable=SC2154 log_info "--- \\e[32minfracost\\e[0m" if [[ "${TF_INFACOST_USAGE_FILE}" ]];then tf_usagefile="--sync-usage-file --usage-file ${TF_INFACOST_USAGE_FILE}" fi # shellcheck disable=SC2086 infracost ${TF_INFRACOST_ARGS} ${tf_usagefile} --path . } unscope_variables eval_secrets Loading