Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to omit user interaction in gcloud

Tags:

I want to automatically delete instances in google compute engine.

For that I use gcloud gcloud compute instances delete instance-name --zone instance-zone

However gcloud asks me to confirm the action. Is it possible to omit this step and do it automatically?

like image 432
sbeliakov Avatar asked Dec 09 '15 11:12

sbeliakov


People also ask

When running a gcloud command How do you override the configured zone for just that one time?

You can override the default region and zone set in the metadata server by setting the default region and zone in your local client, setting the default region and zone in environment variables, or by including the --zone or --region flag in your commands.

What does gcloud compute SSH do?

You use the gcloud compute ssh command to connect to your VM. Compute Engine sets a username and creates a persistent SSH key pair with the following configurations: Your username is set as the username in your local machine.


1 Answers

gcloud -q compute instances delete instance-name --zone instance-zone 

(--quiet, -q Disable all interactive prompts.)

like image 109
Noa Avatar answered Sep 22 '22 06:09

Noa