gitbeaker/scripts/shutdown.sh
Justin Dalrymple 7f1648802b Major Release v36.0.0 - Improved Typing, and API support (16.0) (#2258)
Adding extensive typing support
Unified browser and Node.JS implementations
Adding support of Gitlab API 16.0
2023-04-26 12:58:56 -04:00

9 lines
302 B
Bash

#!/bin/sh
# use this as a startup script for a compute instance and it will self-destruct after specified interval
# (default = 20 min)
TIMEOUT=20
# schedule the instance to delete itself
echo "gcloud compute instances delete $(hostname) --zone northamerica-northeast1-b" | at Now + $TIMEOUT Minutes