diff --git a/gke.tf b/gke.tf index 884f444..64e319b 100644 --- a/gke.tf +++ b/gke.tf @@ -5,15 +5,13 @@ provider "google" { } resource "google_container_cluster" "primary" { - name = "gke-example" - zone = "europe-west2-a" + name = "gke-example" + zone = "europe-west2-a" + remove_default_node_pool = true - /* - node_pool = [{ - name = "default-pool" - node_count = 0 - }] - */ + node_pool { + name = "default-pool" + } } resource "google_container_node_pool" "primary_pool" { @@ -35,19 +33,4 @@ resource "google_container_node_pool" "primary_pool" { auto_repair = true auto_upgrade = true } - - # Delete the default node pool before spinning this one up - depends_on = ["null_resource.default_cluster_deleter"] -} - -resource "null_resource" "default_cluster_deleter" { - provisioner "local-exec" { - command = <