Skip to content

Instantly share code, notes, and snippets.

@Raizan
Raizan / start-vpn.sh
Last active April 4, 2018 16:10 — forked from kordless/start-vpn.sh
VPN Server for Google Cloud
#!/bin/bash
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)
SERVER_NAME=overtime-$NEW_UUID
gcloud compute instances create $SERVER_NAME \
--machine-type "f1-micro" \
--image-family ubuntu-1604-lts \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "20" \
--boot-disk-type "pd-ssd" \
--boot-disk-device-name "$NEW_UUID" \