Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created March 28, 2021 02:52
Show Gist options
  • Select an option

  • Save KyMidd/8e90feb9fa968537dc1fe2554a751d7f to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/8e90feb9fa968537dc1fe2554a751d7f to your computer and use it in GitHub Desktop.
#!/bin/bash
# Plan.out is binary file populated with "terraform plan -out plan.out"
# Use terraform show to read plan.out as text, and filter for resource change lines, output to file
terraform show -no-color plan.out | grep "will be" > plan_decoded.out
terraform show -no-color plan.out | grep "must be" >> plan_decoded.out
input="plan_decoded.out"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment