Skip to content

Commit 4979e66

Browse files
committed
google_image_nixos: add labels parameter
Allow to apply labels to images
1 parent 89a4fb7 commit 4979e66

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

google_image_nixos/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ variable "gcp_project_id" {
1010
description = "The ID of the project in which the resource belongs. If it is not provided, the provider project is used."
1111
}
1212

13+
variable "labels" {
14+
type = map(string)
15+
default = {}
16+
description = "A map of labels applied to this image."
17+
}
18+
1319
variable "licenses" {
1420
type = list(string)
1521

@@ -41,6 +47,7 @@ resource "google_compute_image" "nixos" {
4147
description = "NixOS ${var.nixos_version}"
4248
family = "nixos"
4349
project = var.gcp_project_id
50+
labels = var.labels
4451
licenses = var.licenses
4552

4653
raw_disk {

0 commit comments

Comments
 (0)