diff --git a/modules/compute_instance/main.tf b/modules/compute_instance/main.tf index baf28587..b68e91cb 100644 --- a/modules/compute_instance/main.tf +++ b/modules/compute_instance/main.tf @@ -50,7 +50,7 @@ resource "google_compute_instance_from_template" "compute_instance" { zone = var.zone == null ? data.google_compute_zones.available.names[count.index % length(data.google_compute_zones.available.names)] : var.zone deletion_protection = var.deletion_protection resource_policies = var.resource_policies - + labels = var.labels dynamic "network_interface" { for_each = local.network_interface diff --git a/modules/compute_instance/variables.tf b/modules/compute_instance/variables.tf index b4c31e76..df2435fc 100644 --- a/modules/compute_instance/variables.tf +++ b/modules/compute_instance/variables.tf @@ -116,3 +116,9 @@ variable "resource_policies" { type = list(string) default = [] } + +variable "labels" { + type = map(string) + description = "(Optional) Labels to override those from the template, provided as a map" + default = null +}