-
-
Save KyMidd/f6b8ef23b229745295b4eacc0f702458 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read the tf.plan file, filter for change line | |
TERRAFORM_PLAN_OUTPUT=$(terraform show -no-color tf.plan | grep -E 'Your infrastructure matches the configuration|Terraform will perform the following actions' || echo "error") | |
# Test if read successfully | |
if [[ "$TERRAFORM_PLAN_OUTPUT" == "error" ]]; then | |
echo "There was an issue with reading the terraform plan file, continuing to be safe" | |
else | |
echo "Terraform plan output file retrieved successfully, checking for changes" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment