From ea012f5c57a79c9de56f529dd9cc2ea9d3673838 Mon Sep 17 00:00:00 2001 From: Gari Singh Date: Fri, 3 Feb 2023 14:25:12 -0500 Subject: [PATCH] fix: remove datapath provider from Autopilot modules (#1556) Signed-off-by: Gari Singh Co-authored-by: Bharath KKB --- autogen/main/cluster.tf.tmpl | 4 +++- modules/beta-autopilot-private-cluster/cluster.tf | 2 -- modules/beta-autopilot-public-cluster/cluster.tf | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index be8444160..5d2b3cc9f 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -298,8 +298,10 @@ resource "google_container_cluster" "primary" { } {% endif %} } - + {% if autopilot_cluster != true %} + datapath_provider = var.datapath_provider + {% endif %} {% if beta_cluster %} networking_mode = "VPC_NATIVE" diff --git a/modules/beta-autopilot-private-cluster/cluster.tf b/modules/beta-autopilot-private-cluster/cluster.tf index e9dcf947c..2c4a80cb1 100644 --- a/modules/beta-autopilot-private-cluster/cluster.tf +++ b/modules/beta-autopilot-private-cluster/cluster.tf @@ -119,8 +119,6 @@ resource "google_container_cluster" "primary" { } - datapath_provider = var.datapath_provider - networking_mode = "VPC_NATIVE" ip_allocation_policy { cluster_secondary_range_name = var.ip_range_pods diff --git a/modules/beta-autopilot-public-cluster/cluster.tf b/modules/beta-autopilot-public-cluster/cluster.tf index a75edce9f..a24d5020e 100644 --- a/modules/beta-autopilot-public-cluster/cluster.tf +++ b/modules/beta-autopilot-public-cluster/cluster.tf @@ -119,8 +119,6 @@ resource "google_container_cluster" "primary" { } - datapath_provider = var.datapath_provider - networking_mode = "VPC_NATIVE" ip_allocation_policy { cluster_secondary_range_name = var.ip_range_pods