20251215T225903CET
This commit is contained in:
28
build.sh
Normal file
28
build.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
VULTR_API_KEY="G7QPY6RQR7TNU7G2WRVJYOQZCEOYXB23UB7Q"
|
||||
USER_DATA="$(cat user-data | base64 --wrap=0)"
|
||||
|
||||
NEW_INSTANCE=$(jq --null-input --compact-output \
|
||||
--arg user_data "${USER_DATA}" \
|
||||
'{
|
||||
"activation_email": true,
|
||||
"region": "ams",
|
||||
"plan": "vc2-1c-1gb",
|
||||
"os_id": 2625,
|
||||
"label": "debian",
|
||||
"hostname": "debian",
|
||||
"backups": "disabled",
|
||||
"enable_ipv6": false,
|
||||
"disable_public_ipv4": false,
|
||||
"ddos_protection": false,
|
||||
"user_data": $user_data,
|
||||
"user_scheme": "root"
|
||||
}')
|
||||
|
||||
curl --silent 'https://api.vultr.com/v2/instances' \
|
||||
--request POST \
|
||||
--header "Authorization: Bearer ${VULTR_API_KEY}" \
|
||||
--header 'Accept: application/json' \
|
||||
--data "${NEW_INSTANCE}" | jq -r '.instance.id'
|
||||
Reference in New Issue
Block a user