Skip to content

Commit

Permalink
feat: Add additional label references (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacbd authored Dec 12, 2024
1 parent afac51c commit 227f60b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ module "app_gke" {
depends_on = [module.project_factory_project_services]
max_node_count = local.max_node_count
min_node_count = local.min_node_count
labels = var.labels
}

module "app_lb" {
Expand Down
3 changes: 2 additions & 1 deletion modules/app_gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ locals {
}

resource "google_container_cluster" "default" {
name = "${var.namespace}-cluster"
name = "${var.namespace}-cluster"
resource_labels = var.labels

network = var.network.self_link
subnetwork = var.subnetwork.self_link
Expand Down
8 changes: 7 additions & 1 deletion modules/app_gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ variable "namespace" {
description = "Friendly name prefix used for tagging and naming AWS resources."
}

variable "labels" {
type = map(string)
description = "Labels to apply to resources"
default = {}
}

variable "service_account" {
description = "The service account associated with the GKE cluster instances that host Weights & Biases."
type = object({ email = string })
Expand Down Expand Up @@ -58,4 +64,4 @@ variable "deletion_protection" {
description = "If the GKE Cluster should have deletion protection enabled. The GKE Cluster can't be deleted when this value is set to `true`."
type = bool
default = true
}
}

0 comments on commit 227f60b

Please sign in to comment.