diff --git a/scripts/gcp-create.sh b/scripts/gcp-create.sh index b65d6a4..b174c0f 100755 --- a/scripts/gcp-create.sh +++ b/scripts/gcp-create.sh @@ -17,14 +17,14 @@ echo "=== gcp-dev.sh $PROJECT $BRANCH" echo "+++ creating VM" gcloud compute instances create --zone=$ZONE $VM --machine-type=e2-highcpu-4 --preemptible +IP=$(gcloud compute instances describe essentials --format='value(networkInterfaces.accessConfigs[0].natIP)') -echo "+++ wait for boot" +echo "+++ wait for boot $IP" while ! gcloud compute ssh --zone=$ZONE $NAME@$VM --command='hostname' ; do sleep 1 done echo "+++ configuring VM" - gcloud compute ssh --zone=$ZONE $NAME@$VM --ssh-flag='-A' < ~/.ssh/$VM.config <