google-cloud-platform - 如何在 gcp 中重命名子网?

标签 google-cloud-platform terraform terraform-provider-gcp google-vpc

有没有办法在 gcp 中重命名子网?在控制台中或使用 Terraform。

我宁愿不删除并重新创建子网,因为还有其他资源正在使用该子网。

根据 Google 文档,子网名称一旦创建就无法更改。

例子:

Change subnet name = sn-env-north-01

to this = sn-dev-north-01

谢谢。

最佳答案

实际上,您已经回答了您的问题 - 这是不可能的。

根据文档Using VPC networksWorking with subnets :

You cannot change the name or region of a subnet after you have created it. However, you can delete a subnet and replace it, as long as no resources are using it.

您可以尝试通过填写 feature request 来更改此行为在Google Public Issue Tracker .

关于google-cloud-platform - 如何在 gcp 中重命名子网?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63948764/

相关文章:

php - App Engine (PHP) 与 Cloud SQL 的连接失败

Terraform - 如何将 tfvars 与模块一起使用

variables - 地形变量中的 map 内的 map

google-cloud-platform - 使用 Terraform 创建 GCP 自定义 IAM 角色

google-cloud-platform - 如何使用java SDK在GCP中创建http负载均衡器?

python - Google机器学习引擎deployment_uri错误

python - Google Cloud Endpoints 可以与文本转语音配合使用吗?

kubernetes - Terraform GKE 节点池随着身份验证访问范围的减少而启动

google-cloud-platform - 如何在 gcp terraform 脚本中提供图像名称?

terraform - 需要权限 iam.serviceAccounts.setIamPolicy 才能对服务帐户执行此操作