From c44979cdf3c4ea6670b2bcff481a9fb6e9548bac Mon Sep 17 00:00:00 2001 From: Paddy Date: Mon, 8 May 2017 00:38:11 -0700 Subject: [PATCH 1/3] providers/google: add google_container_versions data source. Add a data source for listing available versions for Container Engine clusters or retrieving the latest available version. This is mostly to support our tests for specifying a version for cluster creation; the withVersion test has been updated to use the data source, meaning it will stop failing on us as new versions get released. --- d/google_container_versions.html.markdown | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 d/google_container_versions.html.markdown diff --git a/d/google_container_versions.html.markdown b/d/google_container_versions.html.markdown new file mode 100644 index 00000000..b7b8afd3 --- /dev/null +++ b/d/google_container_versions.html.markdown @@ -0,0 +1,46 @@ +--- +layout: "google" +page_title: "Google: google_container_versions" +sidebar_current: "docs-google-datasource-container-versions" +description: |- + Provides lists of available Google Container versions for masters and nodes. +--- + +# google\_container\_versions + +Provides access to available Google Container versions in a zone for a given project. + +```hcl +data "google_container_versions" "central1b" { + zone = "us-central1-b" +} + +resource "google_container_cluster" "foo" { + name = "terraform-test-cluster" + zone = "us-central1-b" + node_version = "${data.google_container_versions.central1b.latest_node_version}" + initial_node_count = 1 + + master_auth { + username = "mr.yoda" + password = "adoy.rm" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `zone` (required) - Zone to list available cluster versions for. Should match the zone the cluster will be deployed in. +* `project` (optional) - ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. + Defaults to the project that the provider is authenticated with. + +## Attributes Reference + +The following attributes are exported: + +* `valid_master_versions` - A list of versions available in the given zone for use with master instances. +* `valid_node_versions` - A list of versions available in the given zone for use with node instances. +* `latest_master_version` - The latest version available in the given zone for use with master instances. +* `latest_node_version` - The latest version available in the given zone for use with node instances. From 2ccccbb8f20bb442874b3a291fd17a550c2316aa Mon Sep 17 00:00:00 2001 From: Paddy Date: Wed, 10 May 2017 15:01:15 -0700 Subject: [PATCH 2/3] google_container_versions => google_container_engine_versions As per feedback from @danawillow and @radeksimko. --- ...kdown => google_container_engine_versions.html.markdown} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename d/{google_container_versions.html.markdown => google_container_engine_versions.html.markdown} (87%) diff --git a/d/google_container_versions.html.markdown b/d/google_container_engine_versions.html.markdown similarity index 87% rename from d/google_container_versions.html.markdown rename to d/google_container_engine_versions.html.markdown index b7b8afd3..ad48595f 100644 --- a/d/google_container_versions.html.markdown +++ b/d/google_container_engine_versions.html.markdown @@ -1,6 +1,6 @@ --- layout: "google" -page_title: "Google: google_container_versions" +page_title: "Google: google_container_engine_versions" sidebar_current: "docs-google-datasource-container-versions" description: |- Provides lists of available Google Container versions for masters and nodes. @@ -11,14 +11,14 @@ description: |- Provides access to available Google Container versions in a zone for a given project. ```hcl -data "google_container_versions" "central1b" { +data "google_container_engine_versions" "central1b" { zone = "us-central1-b" } resource "google_container_cluster" "foo" { name = "terraform-test-cluster" zone = "us-central1-b" - node_version = "${data.google_container_versions.central1b.latest_node_version}" + node_version = "${data.google_container_engine_versions.central1b.latest_node_version}" initial_node_count = 1 master_auth { From 1214f5ccabb86a5b3125c01f450bd258c5428144 Mon Sep 17 00:00:00 2001 From: Paddy Date: Wed, 10 May 2017 15:41:02 -0700 Subject: [PATCH 3/3] More doc updates container => container engine. --- d/google_container_engine_versions.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d/google_container_engine_versions.html.markdown b/d/google_container_engine_versions.html.markdown index ad48595f..855e9bc9 100644 --- a/d/google_container_engine_versions.html.markdown +++ b/d/google_container_engine_versions.html.markdown @@ -3,12 +3,12 @@ layout: "google" page_title: "Google: google_container_engine_versions" sidebar_current: "docs-google-datasource-container-versions" description: |- - Provides lists of available Google Container versions for masters and nodes. + Provides lists of available Google Container Engine versions for masters and nodes. --- -# google\_container\_versions +# google\_container\_engine\_versions -Provides access to available Google Container versions in a zone for a given project. +Provides access to available Google Container Engine versions in a zone for a given project. ```hcl data "google_container_engine_versions" "central1b" {