【问题标题】:How to enable private google access in all subnets of a VPC如何在 VPC 的所有子网中启用私有 google 访问
【发布时间】:2021-12-18 11:38:33
【问题描述】:

如何轻松为 GCP VPC 中的所有子网启用私有 Google 访问权限?

为单个子网启用私人 Google 访问权限的说明可在以下位置找到: https://cloud.google.com/vpc/docs/configure-private-google-access#config-pga

【问题讨论】:

    标签: google-cloud-platform gcloud google-vpc


    【解决方案1】:

    使用 bash 列出所有子网,然后将它们传送到更新命令中:

    gcloud compute networks subnets list --filter=<your_vpc> --format="get(REGION)" | awk -F/ '{print $NF}' | xargs -I {} gcloud compute networks subnets update <your_vpc> --region={} --enable-private-ip-google-access
    

    【讨论】:

      猜你喜欢
      • 2014-05-26
      • 1970-01-01
      • 2018-02-11
      • 1970-01-01
      • 2020-09-24
      • 2020-12-06
      • 2019-11-28
      • 2018-11-26
      • 2020-05-02
      相关资源
      最近更新 更多