【发布时间】:2019-11-13 16:01:37
【问题描述】:
如何在 Google VPC 项目中运行的 Google 数据流模板中传递/设置“usePublicIps”作为运行时参数?
【问题讨论】:
标签: google-cloud-dataflow apache-beam
如何在 Google VPC 项目中运行的 Google 数据流模板中传递/设置“usePublicIps”作为运行时参数?
【问题讨论】:
标签: google-cloud-dataflow apache-beam
参数 usePublicIps 在运行时不能被覆盖。生成数据流模板时需要设置/取消设置此参数。
以下命令显示了如何为模板禁用它。
mvn compile exec:java -Dexec.mainClass=class -Dexec.args="--project=$PROJECT \
--runner=DataflowRunner --stagingLocation=bucket --templateLocation=bucket \
--usePublicIps=false --subnetwork=https://www.googleapis.com/compute/v1/projects/my-cloud-project/regions/us-central1/subnetworks/mysubnetwork"
此外,您还必须打开此链接https://cloud.google.com/vpc/docs/configure-private-google-access#configuring_access_to_google_services_from_internal_ips 中提到的子网的私有 google 访问权限,并在 maven 构建中将其用作子网参数。
【讨论】: