Skip to content

Commit 899eeec

Browse files
committed
implements enhanced version of tf_taint
1 parent 4d9877c commit 899eeec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/terraform.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ alias tf_providers='terraform providers'
4747
alias tf_state_ls='terraform state list'
4848
alias tf_state_mv='terraform state mv'
4949
alias tf_state_rm='terraform state rm'
50-
alias tf_taint='terraform taint'
5150
alias tf_validate='terraform validate'
5251

5352

@@ -228,6 +227,15 @@ function tf_state_show {
228227
fi
229228
}
230229

230+
function tf_taint {
231+
if [ "$*" == "" ]; then
232+
# shellcheck disable=SC2046
233+
tf_taint $(gum spin --title "listing ... " --show-output tofu state list | gum filter)
234+
else
235+
tofu taint $* | tee >(to_clipboard)
236+
fi
237+
}
238+
231239
function tf_test {
232240

233241
if [[ $(find . -type f -name "*.tftest.hcl" | wc -c | xargs) != "0" ]]; then

0 commit comments

Comments
 (0)