Skip to content

Commit

Permalink
feat: implement labels variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaitos committed Jun 14, 2023
1 parent bfbe90f commit f59ea25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ resource "google_compute_instance" "main" {
block-project-ssh-keys = true
}

labels = {
container-vm = module.gce_container_sqlproxy.vm_container_label
}
labels = merge(
{ container-vm = module.gce_container_sqlproxy.vm_container_label },
var.labels
)

tags = [
local.network_tag
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ variable "allow_public_ip" {
type = bool
default = false
}

variable "labels" {
description = "A set of key/value label pairs to assign to the vm."
type = map(string)
default = {}
}

0 comments on commit f59ea25

Please sign in to comment.