From 2c0afeef34410f39f91de2b359f67edd1056844e Mon Sep 17 00:00:00 2001 From: Eric Hole Date: Mon, 13 Mar 2023 16:15:30 -0700 Subject: [PATCH] Fixes gke version for test and docs --- .../tests/resource_container_node_pool_test.go.erb | 12 ++++++++---- .../website/docs/r/container_cluster.html.markdown | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb b/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb index b2fa3d516bf4..133a2a5e9cf2 100644 --- a/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb @@ -1271,9 +1271,16 @@ func TestAccContainerNodePool_localNvmeSsdBlockConfig(t *testing.T) { func testAccContainerNodePool_localNvmeSsdBlockConfig(cluster, np string) string { return fmt.Sprintf(` +data "google_container_engine_versions" "central1a" { + location = "us-central1-a" + // this feature became available in 1.25.3-gke.1800, not sure if theres a better way to do + version_prefix = "1.25.3" +} + resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" + min_master_version = data.google_container_engine_versions.central1a.latest_master_version initial_node_count = 1 } @@ -1281,6 +1288,7 @@ resource "google_container_node_pool" "np" { name = "%s" location = "us-central1-a" cluster = google_container_cluster.cluster.name + node_version = data.google_container_engine_versions.central1a.latest_node_version initial_node_count = 1 node_config { @@ -1294,10 +1302,6 @@ resource "google_container_node_pool" "np" { } <% end %> - - - - func TestAccContainerNodePool_gcfsConfig(t *testing.T) { t.Parallel() diff --git a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown index d2026925ff75..44ea2e11bbcd 100644 --- a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -742,10 +742,10 @@ ephemeral_storage_config { } ``` -* `local_nvme_ssd_config` - (Optional, [Beta]) Parameters for the local NVMe SSDs. Structure is [documented below](#nested_local_nvme_ssd_config). +* `local_nvme_ssd_block_config` - (Optional, [Beta]) Parameters for the local NVMe SSDs. Structure is [documented below](#nested_local_nvme_ssd_block_config). ```hcl -local_nvme_ssd_config { +local_nvme_ssd_block_config { local_ssd_count = 2 } ``` @@ -886,9 +886,10 @@ linux_node_config { * `local_ssd_count` (Required) - Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it means to disable using local SSDs as ephemeral storage. -The `local_nvme_ssd_config` block supports: +The `local_nvme_ssd_block_config` block supports: * `local_ssd_count` (Required) - Number of local NVMe SSDs attached to the instance. Each NVMe SSD is 375 GB in size. +-> Note: Only supported in GKE versions v1.25.3-gke.1800 or later. The `gcfs_config` block supports: