Skip to content

Commit 20f369f

Browse files
authored
Merge pull request #53 from remerge/fix-error-missing-cluster
Fix error on missing cluster
2 parents f4ea2e2 + f73a58f commit 20f369f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/vm/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
fqdn = "${local.hostname}.${local.domain}"
55
ip_address = var.ip_address != null ? split("/", var.ip_address)[0] : null
66
ip_prefix = var.ip_address != null ? try(split("/", var.ip_address)[1], "32") : null
7-
tags = var.tags != null ? var.tags : data.netbox_cluster.main[0].tags
7+
tags = var.tags != null ? var.tags : try(data.netbox_cluster.main[0].tags, [])
88
}
99

1010
resource "netbox_virtual_machine" "main" {

0 commit comments

Comments
 (0)