Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing some extra auto-generated configurations and terraform related files and folders #271

Merged
merged 4 commits into from
Jul 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removing some extra auto-generated configurations and terraform relat…
…ed files and folders.
Chambras committed Jul 2, 2021
commit 446749186410493770dc1b2534437c6a2c587468
9 changes: 8 additions & 1 deletion src/scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -95,7 +95,13 @@ destroy_mlz() {

# clean up files
delete_files_in_directory_by_name "${src_path}" "${tfvars_file_name}"
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig" "${configuration_output_path:?}/${tfvars_file_name}"
echo "INFO: deleting ${configuration_output_path}/${mlz_env_name}.mlzconfig ..."
rm -rf "${configuration_output_path}/${mlz_env_name}.mlzconfig"
echo "INFO: deleting ${tf_mlz_main_path}/config.vars ..."
rm -rf "${tf_mlz_main_path}/config.vars"
echo "INFO: deleting terraform.lock file and .terraform folder ..."
rm -rf "${tf_mlz_main_path}/.terraform.lock.hcl"
rm -rf "${tf_mlz_main_path}/.terraform"
}

##########
@@ -131,6 +137,7 @@ check_dependencies
mlz_config_file_path="${configuration_output_path}/${mlz_env_name}.mlzconfig"
tfvars_file_name="${mlz_env_name}.tfvars"
tfvars_file_path="${configuration_output_path}/${tfvars_file_name}"
tf_mlz_main_path=$(realpath "${configuration_output_path}/../terraform/mlz")

# teardown resources
# if terraform destroy fails, notify and continue to destroy mlz