我在Google Cloud Engine上设置了一键式LAMP堆栈,并创建了一个我想要的protect against accidental deletion虚拟机实例
但是,每当我尝试使用gcloud命令行工具运行命令时,我都会收到以下错误:
ERROR: (gcloud.compute.instances.update) unrecognized arguments: --deletion-protection
有没有人有这个工作?文档中有错误吗?
任何帮助将不胜感激,
谢谢!
你能发布你正在运行的确切命令吗?因为我在文档中尝试了两个命令,在这两种情况下我都成功设置了保护:
gcloud compute instances create new-instance --deletion-protection
gcloud compute instances update instance-name --deletion-protection
另一方面,这是您正在使用的Google SDK版本(通过gcloud version
查看)?我的是“Google Cloud SDK 183.0.0”
您可以考虑更新它并重试:
gcloud components update