Google compute engine gcloud计算地址列表返回0个结果,尽管我有外部临时地址

Google compute engine gcloud计算地址列表返回0个结果,尽管我有外部临时地址,google-compute-engine,gcloud,Google Compute Engine,Gcloud,我的项目中有一个google compute实例,带有外部IP。 实例上的descripe命令显示: networkInterfaces: - accessConfigs: - kind: compute#accessConfig name: External NAT natIP: xx.yyy.nnn.mmm networkTier: PREMIUM type: ONE_TO_ONE_NAT fingerprint: hjhjhjhjh= kind:

我的项目中有一个google compute实例,带有外部IP。 实例上的descripe命令显示:

networkInterfaces:
- accessConfigs:
  - kind: compute#accessConfig
    name: External NAT
    natIP: xx.yyy.nnn.mmm
    networkTier: PREMIUM
    type: ONE_TO_ONE_NAT
  fingerprint: hjhjhjhjh=
  kind: compute#networkInterface
  name: nic0
  network: https://www.googleapis.com/compute/v1/projects/foo-201800/global/networks/default
然而,当我在cloudshell上运行时

$ gcloud config get-value project
Your active configuration is: [cloudshell-xxxx]
foo-201800

$ gcloud compute addresses list
Listed 0 items.

$ gcloud compute addresses list --global
Listed 0 items.

$ gcloud version
Google Cloud SDK 215.0.0
...snipped...

外部临时IP地址是否未计入执行的
gcloud compute addresses
中?

命令“gcloud compute addresses”仅统计项目中分配的静态IP地址。更具体地说,您可以在命令摘要中阅读以下说明:

  • :列出项目中地址的摘要信息
在“关于计算引擎IP地址”中,关于静态IP外部地址和临时IP地址的定义如下:

  • 静态外部IP地址分配给项目

  • 临时外部IP地址可用于VM实例和转发规则

临时IP附加到资源而不是项目,当您使用命令“gcloud compute addresses”时,您只列出附加到项目中的IP;静态外部IP

您有一个示例来列出不同类型的IP地址

――