diff --git a/main.tf b/main.tf index 220229a..1777406 100644 --- a/main.tf +++ b/main.tf @@ -14,7 +14,7 @@ terraform { variable "project" { description = "Project ID." type = string - default = "secret-footing-312423" + default = "hip-wharf-319304" } variable "region" { @@ -36,7 +36,7 @@ provider "google" { } data "google_project" "project" { - project = var.project + project_id = var.project } #################### KMS ################################## @@ -136,6 +136,7 @@ resource "google_container_node_pool" "primary" { name_prefix = "node-pool" location = var.region cluster = google_container_cluster.primary.name + initial_node_count = 1 autoscaling { min_node_count = 0 @@ -162,3 +163,8 @@ resource "google_container_node_pool" "primary" { google_project_service.container ] } + +output "gke_connect_command" { + description = "Command to run to connect to the kubernetes cluster." + value = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --region ${var.region} --project ${var.project}" +}