chore: update gitignore and handle no changes in apply script

This commit is contained in:
Jan-Ole Hübner 2025-02-05 20:44:57 +01:00
parent 5f6a9b801a
commit 3fe945f4d2
2 changed files with 8 additions and 0 deletions

2
.gitignore vendored
View file

@ -5,3 +5,5 @@ venv/
.terraform.lock.hcl
.terraform
auth.yaml
tfplan
plan.log

View file

@ -26,6 +26,12 @@ if ! tofu plan -out=tfplan 2>&1 | tee plan.log; then
fi
fi
# Check if no changes are required
if grep -q "No changes" plan.log; then
echo "✅ No changes detected. Exiting."
exit 0
fi
#applying a planfile skips confirmations...
echo "✅ Plan successful. Ready to apply changes."
echo "Do you want to apply these changes? (y/n)"