【问题标题】:Terraform code for GCP private cluster not workingGCP 私有集群的 Terraform 代码不起作用
【发布时间】:2020-11-02 07:48:00
【问题描述】:

我有 GCP private 集群的 terraform 代码,一个月前它可以工作,但今天我正在尝试它,现在它给出了错误。

Error: googleapi: Error 400: Alias IP addresses are required for private cluster, please make sure you enable alias IPs when creating a cluster., badRequest

  on modules/gke-cluster/main.tf line 20, in resource "google_container_cluster" "cluster":
  20: resource "google_container_cluster" "cluster" {

我错过了什么吗?帮助将不胜感激

【问题讨论】:

标签: google-cloud-platform terraform google-kubernetes-engine


【解决方案1】:

要启用 IP 别名,您需要使用 ip_allocation_policy 属性

块可以留空,因为里面的所有参数都是可选的。

【讨论】:

    猜你喜欢
    • 2021-04-30
    • 2020-04-15
    • 2018-12-03
    • 1970-01-01
    • 1970-01-01
    • 2020-01-25
    • 2020-07-24
    • 1970-01-01
    • 2021-05-01
    相关资源
    最近更新 更多