Skip to content

Instantly share code, notes, and snippets.

@nijave
Created December 13, 2023 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nijave/9a1e1a54293c8b1063a888e2eb99c4a1 to your computer and use it in GitHub Desktop.
Save nijave/9a1e1a54293c8b1063a888e2eb99c4a1 to your computer and use it in GitHub Desktop.
Terragrunt pretty print
# 1. Find colored lines
# 2. Strip out useless lines
# 3. Strip empty "colored" lines
grep --color=never $'\x1b''\[[0-9;]*' \
| grep -vE 'Terraform has been|Initializing |use this backend unless the backend configuration changes|commands will detect it and remind you to do so if necessary|Refreshing state...|Read complete after |Reading...| copy_backend_before_init |Terraform has compared your real infrastructure|No changes.' \
| sed -E '/^'$'\x1b''\[0m'$'\x1b''\[32m/d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment