chore: update gitignore and handle no changes in apply script
This commit is contained in:
parent
5f6a9b801a
commit
3fe945f4d2
2 changed files with 8 additions and 0 deletions
6
apply.sh
6
apply.sh
|
@ -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)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue