Skip to content

Instantly share code, notes, and snippets.

@daern91
daern91 / keybase.md
Last active April 14, 2021 07:28
keybase.md

Keybase proof

I hereby claim:

  • I am daern91 on github.
  • I am daern (https://keybase.io/daern) on keybase.
  • I have a public key ASAkWX0_wyq8qNlcswy7aoTbu2OutjWfqQEGkFMnVHXkcQo

To claim this, I am signing this object:

@daern91
daern91 / move_tf_state.sh
Created September 14, 2021 08:15
script to move terraform states
# Run plan and check how many we can move
# then run repeat command with the amount
# repeat 27 { sh move_tf_state.sh }
tomove=$(terraform plan | grep 'destroyed\|created' | awk 'NR==1 {print $3}' | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g')
if [ -z "$tomove" ]
then
echo no state to move