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
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,3 +5,5 @@ venv/
|
||||||
.terraform.lock.hcl
|
.terraform.lock.hcl
|
||||||
.terraform
|
.terraform
|
||||||
auth.yaml
|
auth.yaml
|
||||||
|
tfplan
|
||||||
|
plan.log
|
||||||
|
|
6
apply.sh
6
apply.sh
|
@ -26,6 +26,12 @@ if ! tofu plan -out=tfplan 2>&1 | tee plan.log; then
|
||||||
fi
|
fi
|
||||||
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...
|
#applying a planfile skips confirmations...
|
||||||
echo "✅ Plan successful. Ready to apply changes."
|
echo "✅ Plan successful. Ready to apply changes."
|
||||||
echo "Do you want to apply these changes? (y/n)"
|
echo "Do you want to apply these changes? (y/n)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue