Skip to content

Commit d9f7782

Browse files
authored
fix: Explicitly specify VPC-native clusters for beta modules. (#598)
* fix: Explicitly specify VPC-native clusters for beta modules. * Use local module for safer cluster example. * Specify machine_type for GPU nodes.
1 parent 1de41ef commit d9f7782

File tree

23 files changed

+32
-21
lines changed

23 files changed

+32
-21
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ resource "google_container_cluster" "primary" {
171171
{% endif %}
172172
}
173173

174+
{% if beta_cluster %}
175+
networking_mode = "VPC_NATIVE"
176+
{% endif %}
174177
ip_allocation_policy {
175178
cluster_secondary_range_name = var.ip_range_pods
176179
services_secondary_range_name = var.ip_range_services

autogen/main/versions.tf.tmpl

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

2020
required_providers {
2121
{% if beta_cluster %}
22-
google-beta = ">= 3.23.0, <4.0.0"
22+
google-beta = ">= 3.29.0, <4.0.0"
2323
{% else %}
2424
google = ">= 3.16, <4.0.0"
2525
{% endif %}

examples/node_pool/main.tf

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

2121
provider "google-beta" {
22-
version = "~> 3.23.0"
22+
version = "~> 3.29.0"
2323
region = var.region
2424
}
2525

@@ -48,6 +48,7 @@ module "gke" {
4848
},
4949
{
5050
name = "pool-02"
51+
machine_type = "n1-standard-2"
5152
min_count = 1
5253
max_count = 2
5354
local_ssd_count = 0

examples/node_pool_update_variant/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ module "gke" {
6363
},
6464
{
6565
name = "pool-02"
66+
machine_type = "n1-standard-2"
6667
min_count = 1
6768
max_count = 2
6869
disk_size_gb = 30

examples/node_pool_update_variant_beta/main.tf

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

2121
provider "google-beta" {
22-
version = "~> 3.23.0"
22+
version = "~> 3.29.0"
2323
credentials = file(var.credentials_path)
2424
region = var.region
2525
}
@@ -64,6 +64,7 @@ module "gke" {
6464
},
6565
{
6666
name = "pool-02"
67+
machine_type = "n1-standard-2"
6768
min_count = 1
6869
max_count = 2
6970
disk_size_gb = 30

examples/regional_private_node_pool_oauth_scopes/provider.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616

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

2121
provider "google-beta" {
22-
version = "3.23.0"
22+
version = "~> 3.29.0"
2323
}

examples/safer_cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ provider "google" {
3434
}
3535

3636
provider "google-beta" {
37-
version = "~> 3.23.0"
37+
version = "~> 3.29.0"
3838
}
3939

4040
module "gke" {

examples/safer_cluster_iap_bastion/cluster.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616

1717
module "gke" {
18-
source = "terraform-google-modules/kubernetes-engine/google//modules/safer-cluster"
19-
version = "~> 9.0"
18+
source = "../../modules/safer-cluster"
19+
2020
project_id = module.enabled_google_apis.project_id
2121
name = var.cluster_name
2222
region = var.region

examples/safer_cluster_iap_bastion/provider.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 3.23"
18+
version = "~> 3.29.0"
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 3.23"
22+
version = "~> 3.29.0"
2323
}

examples/simple_regional_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-beta" {
22-
version = "~> 3.23.0"
22+
version = "~> 3.29.0"
2323
region = var.region
2424
}
2525

0 commit comments

Comments
 (0)