要删除 gcloud 实例模板,我们调用
gcloud compute instance-templates delete TEMPLATE_NAME
但是我们必须回答一个不适合自动化 bash 脚本的 Y/n 问题。我们想要自动回答是的,如何?
附言
我的 google search对于这个问题的结果几乎没有帮助。
该命令的手册页也没有任何其他参数。
gcloud help compute instance-templates delete
最佳答案
gcloud
有一组全局标志,包括 --quiet
禁用此类提示:
https://cloud.google.com/sdk/gcloud/reference/
关于automation - 命令 `gcloud compute instance-templates delete` 的自动回答是,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54751800/