Skip to content
Snippets Groups Projects
Commit 6d04bd3e authored by Timo Furrer's avatar Timo Furrer
Browse files

Implement delete-state command in gitlab-tofu script

parent 09c7bee5
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,7 @@ fi ...@@ -107,7 +107,7 @@ fi
# Dependencies # Dependencies
# ============ # ============
# Defines all the external dependencies and checks if they exist, if not, abort with an error. # Defines all the external dependencies and checks if they exist, if not, abort with an error.
dependencies="dirname basename pwd sed idn2 jq tofu" dependencies="dirname basename pwd sed idn2 jq tofu curl"
if [ -n "$ZSH_VERSION" ]; then if [ -n "$ZSH_VERSION" ]; then
# ZSH is the only supported SHELL that does not split by word by default, # ZSH is the only supported SHELL that does not split by word by default,
...@@ -428,6 +428,9 @@ if [ $sourced -eq 0 ]; then ...@@ -428,6 +428,9 @@ if [ $sourced -eq 0 ]; then
# shellcheck disable=SC2086 # shellcheck disable=SC2086
tofu "${tf_chdir_opt}" "${@}" ${var_file_args} tofu "${tf_chdir_opt}" "${@}" ${var_file_args}
;; ;;
"delete-state")
curl --request DELETE -u "${backend_username}:${backend_password}" "${backend_address}"
;;
--) --)
shift shift
tofu "${tf_chdir_opt}" "${@}" tofu "${tf_chdir_opt}" "${@}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment