Skip to content

Commit a834a54

Browse files
Replace a hardcoded Kubernetes version with a current stable one. (#13892) (#22670)
[upstream:b2337d16645be7bc992a41dcf4459710a378160f] Signed-off-by: Modular Magician <[email protected]>
1 parent cf6aab6 commit a834a54

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

google/services/container/resource_container_cluster_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7114,7 +7114,7 @@ func TestAccContainerCluster_withCidrBlockWithoutPrivateEndpointSubnetwork(t *te
71147114
CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
71157115
Steps: []resource.TestStep{
71167116
{
7117-
Config: testAccContainerCluster_withCidrBlockWithoutPrivateEndpointSubnetwork(containerNetName, clusterName, "us-central1-a"),
7117+
Config: testAccContainerCluster_withCidrBlockWithoutPrivateEndpointSubnetwork(containerNetName, clusterName),
71187118
},
71197119
{
71207120
ResourceName: "google_container_cluster.with_private_flexible_cluster",
@@ -7126,8 +7126,12 @@ func TestAccContainerCluster_withCidrBlockWithoutPrivateEndpointSubnetwork(t *te
71267126
})
71277127
}
71287128

7129-
func testAccContainerCluster_withCidrBlockWithoutPrivateEndpointSubnetwork(containerNetName, clusterName, location string) string {
7129+
func testAccContainerCluster_withCidrBlockWithoutPrivateEndpointSubnetwork(containerNetName, clusterName string) string {
71307130
return fmt.Sprintf(`
7131+
data "google_container_engine_versions" "uscentral1a" {
7132+
location = "us-central1-a"
7133+
}
7134+
71317135
resource "google_compute_network" "container_network" {
71327136
name = "%s"
71337137
auto_create_subnetworks = false
@@ -7141,8 +7145,8 @@ resource "google_compute_subnetwork" "container_subnetwork" {
71417145
71427146
resource "google_container_cluster" "with_private_flexible_cluster" {
71437147
name = "%s"
7144-
location = "%s"
7145-
min_master_version = "1.29"
7148+
location = "us-central1-a"
7149+
min_master_version = data.google_container_engine_versions.uscentral1a.release_channel_latest_version["STABLE"]
71467150
initial_node_count = 1
71477151
71487152
networking_mode = "VPC_NATIVE"
@@ -7155,7 +7159,7 @@ resource "google_container_cluster" "with_private_flexible_cluster" {
71557159
}
71567160
deletion_protection = false
71577161
}
7158-
`, containerNetName, clusterName, location)
7162+
`, containerNetName, clusterName)
71597163
}
71607164

71617165
func TestAccContainerCluster_withEnablePrivateEndpointToggle(t *testing.T) {

0 commit comments

Comments
 (0)