<p>I have this Terraform GKE cluster with 3 nodes. When I deploy this cluster all nodes are localised in the same zones which is <code>europe-west1-b</code>.</p>
<p><code>gke-cluster.yml</code></p>
<pre class="lang-yaml prettyprint-override"><code>resource &quot;google_container_cluster&quot; &quot;primary&quot; {
  name = var.cluster_name

  initial_node_count       = var.initial_node_count

  master_auth {
    username = &quot;&quot;
    password = &quot;&quot;

    client_certificate_config {
      issue_client_certificate = false
    }
  }

  node_config {
    //machine_type = &quot;e2-medium&quot;
    oauth_scopes = [
      &quot;https://www.googleapis.com/auth/logging.write&quot;,
      &quot;https://www.googleapis.com/auth/monitoring&quot;,
    ]

    metadata = {
      disable-legacy-endpoints = &quot;true&quot;
    }

    labels = {
      app = var.app_name
    }

    tags = [&quot;app&quot;, var.app_name]
  }

  timeouts {
    create = &quot;30m&quot;
    update = &quot;40m&quot;
  }
}
</code></pre>
<p><code>variables.tf</code></p>
<pre class="lang-yaml prettyprint-override"><code>variable &quot;cluster_name&quot; {
  default = &quot;cluster&quot;
}

variable &quot;app_name&quot; {
  default = &quot;my-app&quot;
}

variable &quot;initial_node_count&quot; {
  default = 3
}

variable &quot;kubernetes_min_ver&quot; {
  default = &quot;latest&quot;
}

variable &quot;kubernetes_max_ver&quot; {
  default = &quot;latest&quot;
}

variable &quot;remove_default_node_pool&quot; {
  default = false
}

variable &quot;project&quot; {
  default = &quot;your-project-name&quot;
}

variable &quot;credentials&quot; {
  default = &quot;terraform-key.json&quot;
}

variable &quot;region&quot; {
  default = &quot;europe-west1&quot;
}

variable &quot;zone&quot; {
  type        = list(string)
  description = &quot;The zones to host the cluster in.&quot;
  default     = [&quot;europe-west1-b&quot;, &quot;europe-west1-c&quot;, &quot;europe-west1-d&quot;]
}
</code></pre>
<p>And would like to know if it's possible to deploy each node in a different zone.
If yes how can I do it using Terraform?</p>

<p>Simply add the following line</p>
<pre><code>resource &quot;google_container_cluster&quot; &quot;primary&quot; {
  name = &quot;cluster&quot;
  location = &quot;us-central1&quot;
  initial_node_count       = &quot;3&quot;
</code></pre>
<p>in order to create a <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/regional-clusters" rel="nofollow noreferrer">regional cluster</a>. The above will bring up 9 nodes with each zone (f a b) containing 3 nodes. If you only want 1 node per zone, then just change initial_node_count to 1.</p>
<p>More info <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#argument-reference" rel="nofollow noreferrer">here</a> at Argument reference.</p>
