【发布时间】:2018-01-22 20:54:23
【问题描述】:
我正在尝试使用 terraform 在 Google 云中创建一个实例,并在我申请时继续遇到“compute.subnetworks.use”权限错误。有问题的代码段如下:
network_interface {
subnetwork_project = "hp-cof-st-core-sbx-dev"
subnetwork = "net-cof-st-core-sbx-dev-entfacing-ue4-1"
}
我想通过“与我共享的网络设置”使用子网创建实例。下面给出了如何通过门户配置它的示例:
谷歌门户内的配置1
每当我尝试在 terraform 中进行配置时,都会收到以下消息:
错误:应用计划时出错:
发生了 1 个错误:
google_compute_instance.default:发生 1 个错误:
google_compute_instance.default:创建实例时出错:googleapi:错误 403:“projects/hp-cof-st-core-sbx-dev/regions/us-east4-a/subnetworks”需要“compute.subnetworks.use”权限/net-cof-st-core-sbx-dev-entfacing-ue4-1',禁止
【问题讨论】:
-
如果解决了,请将解决方案分享到社区
标签: terraform