Skip to content

Instantly share code, notes, and snippets.

@kharandziuk
Created February 6, 2022 14:14
Show Gist options
  • Save kharandziuk/732f3dfd7df1bff58722b3de8627f6f4 to your computer and use it in GitHub Desktop.
Save kharandziuk/732f3dfd7df1bff58722b3de8627f6f4 to your computer and use it in GitHub Desktop.
invoke move modules
@task
def task(c):
txt = c.run('terraform state list').stdout.strip()
for each in txt.split('\n'):
if 'module' in each:
continue
c.run(f'terraform state mv {each} module.before_transcoding.{each}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment