google_container_engine_versions

Provides access to available Google Container Engine versions in a zone for a given project.

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_engine_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: