Skip to content

Commit

Permalink
Merge pull request #48 from Buildings-IOT/vpc_gcp
Browse files Browse the repository at this point in the history
Attached subnet to gke cluster
  • Loading branch information
nkotibiot committed Mar 15, 2022
2 parents 7a8f866 + e4d50ed commit c3c1b70
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions cloud/gcp/gks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ resource "google_container_cluster" "biot" {

remove_default_node_pool = true
initial_node_count = 1

network = google_compute_network.vpc.name
subnetwork = google_compute_subnetwork.subnet.name
}

# Separately Managed Node Pool
Expand All @@ -25,7 +28,20 @@ resource "google_container_node_pool" "node_pool" {
node_count = var.gke_num_nodes

node_config {
preemptible = true
machine_type = "e2-medium"
oauth_scopes = [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
]

labels = {
env = var.gcp_project_id
}

# preemptible = true
machine_type = "n1-standard-1"
tags = ["gke-node", "${var.gcp_project_id}-gke"]
metadata = {
disable-legacy-endpoints = "true"
}
}
}

0 comments on commit c3c1b70

Please sign in to comment.