Skip to content

Instantly share code, notes, and snippets.

@thomashartm
Last active June 19, 2024 08:47
Show Gist options
  • Select an option

  • Save thomashartm/38c25c12abda4d5425a4235530e99e5c to your computer and use it in GitHub Desktop.

Select an option

Save thomashartm/38c25c12abda4d5425a4235530e99e5c to your computer and use it in GitHub Desktop.

Revisions

  1. thomashartm revised this gist Jun 19, 2024. 2 changed files with 9 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions remove-terragrunt-state
    Original file line number Diff line number Diff line change
    @@ -1,2 +0,0 @@
    terragrunt state rm $(terragrunt state list --terragrunt-source ../../../ | grep cloudfront_logs) --terragrunt-source ../../../

    9 changes: 9 additions & 0 deletions remove-terragrunt-state.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/bash

    # usage:
    # ./remove-terragrunt-state module.s3_bucket ../../../

    TOKEN=$1
    SOURCE=$2

    terragrunt state rm $(terragrunt state list --terragrunt-source ../../../ | grep $TOKEN) --terragrunt-source $SOURCE
  2. thomashartm renamed this gist Jun 19, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. thomashartm created this gist Jun 19, 2024.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    terragrunt state rm $(terragrunt state list --terragrunt-source ../../../ | grep cloudfront_logs) --terragrunt-source ../../../