Skip to content

Commit 3b5ddb9

Browse files
feat: Allow datapath_provider in GA main module (#1084)
* Allow datapath_provider in GA main module * Update examples and tests to 3.55.0 * Update remaining version bump
1 parent 99cfd98 commit 3b5ddb9

File tree

51 files changed

+69
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+69
-36
lines changed

README.md

Lines changed: 1 addition & 0 deletions

autogen/main/cluster.tf.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,8 @@ resource "google_container_cluster" "primary" {
217217
}
218218
{% endif %}
219219
}
220-
{% if beta_cluster %}
220+
221221
datapath_provider = var.datapath_provider
222-
{% endif %}
223222

224223
{% if beta_cluster %}
225224
networking_mode = "VPC_NATIVE"

autogen/main/variables.tf.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,12 @@ variable "network_policy_provider" {
107107
description = "The network policy provider."
108108
default = "CALICO"
109109
}
110-
{% if beta_cluster %}
110+
111111
variable "datapath_provider" {
112112
type = string
113113
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."
114114
default = "DATAPATH_PROVIDER_UNSPECIFIED"
115115
}
116-
{% endif %}
117116

118117
variable "maintenance_start_time" {
119118
type = string

autogen/main/versions.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ terraform {
3838
required_providers {
3939
google = {
4040
source = "hashicorp/google"
41-
version = ">= 3.39.0, <4.0.0"
41+
version = ">= 3.55.0, <4.0.0"
4242
}
4343
kubernetes = {
4444
source = "hashicorp/kubernetes"

cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ resource "google_container_cluster" "primary" {
120120
}
121121
}
122122

123+
datapath_provider = var.datapath_provider
124+
123125
ip_allocation_policy {
124126
cluster_secondary_range_name = var.ip_range_pods
125127
services_secondary_range_name = var.ip_range_services

examples/deploy_service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/disable_client_cert/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/node_pool_update_variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/regional_private_node_pool_oauth_scopes/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 3.42.0"
18+
version = "~> 3.55.0"
1919
}
2020

2121
provider "google-beta" {

examples/safer_cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ locals {
3131
}
3232

3333
provider "google" {
34-
version = "~> 3.42.0"
34+
version = "~> 3.55.0"
3535
}
3636

3737
provider "google-beta" {

examples/shared_vpc/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_regional/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_private_beta/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_with_kubeconfig/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_with_networking/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 3.45.0"
18+
version = "~> 3.55.0"
1919
}
2020

2121
data "google_client_config" "default" {}

examples/simple_zonal_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_zonal_with_acm/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/simple_zonal_with_hub/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/stub_domains/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/stub_domains_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 3.42.0"
18+
version = "~> 3.55.0"
1919
region = var.region
2020
}
2121

examples/stub_domains_upstream_nameservers/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/upstream_nameservers/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

examples/workload_identity/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.42.0"
22+
version = "~> 3.55.0"
2323
region = var.region
2424
}
2525

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ resource "google_container_cluster" "primary" {
196196
enabled = var.config_connector
197197
}
198198
}
199+
199200
datapath_provider = var.datapath_provider
200201

201202
networking_mode = "VPC_NATIVE"

modules/beta-private-cluster-update-variant/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ variable "network_policy_provider" {
107107
description = "The network policy provider."
108108
default = "CALICO"
109109
}
110+
110111
variable "datapath_provider" {
111112
type = string
112113
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."

modules/beta-private-cluster/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ resource "google_container_cluster" "primary" {
196196
enabled = var.config_connector
197197
}
198198
}
199+
199200
datapath_provider = var.datapath_provider
200201

201202
networking_mode = "VPC_NATIVE"

modules/beta-private-cluster/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ variable "network_policy_provider" {
107107
description = "The network policy provider."
108108
default = "CALICO"
109109
}
110+
110111
variable "datapath_provider" {
111112
type = string
112113
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ resource "google_container_cluster" "primary" {
196196
enabled = var.config_connector
197197
}
198198
}
199+
199200
datapath_provider = var.datapath_provider
200201

201202
networking_mode = "VPC_NATIVE"

modules/beta-public-cluster-update-variant/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ variable "network_policy_provider" {
107107
description = "The network policy provider."
108108
default = "CALICO"
109109
}
110+
110111
variable "datapath_provider" {
111112
type = string
112113
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."

modules/beta-public-cluster/cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ resource "google_container_cluster" "primary" {
196196
enabled = var.config_connector
197197
}
198198
}
199+
199200
datapath_provider = var.datapath_provider
200201

201202
networking_mode = "VPC_NATIVE"

modules/beta-public-cluster/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ variable "network_policy_provider" {
107107
description = "The network policy provider."
108108
default = "CALICO"
109109
}
110+
110111
variable "datapath_provider" {
111112
type = string
112113
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."

modules/private-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions

modules/private-cluster-update-variant/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ resource "google_container_cluster" "primary" {
120120
}
121121
}
122122

123+
datapath_provider = var.datapath_provider
124+
123125
ip_allocation_policy {
124126
cluster_secondary_range_name = var.ip_range_pods
125127
services_secondary_range_name = var.ip_range_services

modules/private-cluster-update-variant/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ variable "network_policy_provider" {
108108
default = "CALICO"
109109
}
110110

111+
variable "datapath_provider" {
112+
type = string
113+
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."
114+
default = "DATAPATH_PROVIDER_UNSPECIFIED"
115+
}
116+
111117
variable "maintenance_start_time" {
112118
type = string
113119
description = "Time window specified for daily or recurring maintenance operations in RFC3339 format"

modules/private-cluster-update-variant/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google = {
2323
source = "hashicorp/google"
24-
version = ">= 3.39.0, <4.0.0"
24+
version = ">= 3.55.0, <4.0.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

modules/private-cluster/README.md

Lines changed: 1 addition & 0 deletions

modules/private-cluster/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ resource "google_container_cluster" "primary" {
120120
}
121121
}
122122

123+
datapath_provider = var.datapath_provider
124+
123125
ip_allocation_policy {
124126
cluster_secondary_range_name = var.ip_range_pods
125127
services_secondary_range_name = var.ip_range_services

modules/private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ variable "network_policy_provider" {
108108
default = "CALICO"
109109
}
110110

111+
variable "datapath_provider" {
112+
type = string
113+
description = "The desired datapath provider for this cluster. By default, `DATAPATH_PROVIDER_UNSPECIFIED` enables the IPTables-based kube-proxy implementation. `ADVANCED_DATAPATH` enables Dataplane-V2 feature."
114+
default = "DATAPATH_PROVIDER_UNSPECIFIED"
115+
}
116+
111117
variable "maintenance_start_time" {
112118
type = string
113119
description = "Time window specified for daily or recurring maintenance operations in RFC3339 format"

modules/private-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google = {
2323
source = "hashicorp/google"
24-
version = ">= 3.39.0, <4.0.0"
24+
version = ">= 3.55.0, <4.0.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

test/fixtures/deploy_service/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.42.0"
24+
version = "~> 3.55.0"
2525
project = var.project_ids[0]
2626
}
2727

test/fixtures/disable_client_cert/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.42.0"
24+
version = "~> 3.55.0"
2525
project = var.project_ids[0]
2626
}
2727

test/fixtures/shared_vpc/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
version = "~> 3.42.0"
24+
version = "~> 3.55.0"
2525
project = var.project_ids[0]
2626
}
2727

0 commit comments

Comments
 (0)