Skip to content

Commit 2878f1d

Browse files
committed
ignore nvram changes on reapply
1 parent 1da4034 commit 2878f1d

File tree

1 file changed

+7
-1
lines changed
  • modules/terraform-libvirt-instance

1 file changed

+7
-1
lines changed

modules/terraform-libvirt-instance/main.tf

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ data "template_file" "user_data" {
4444
}
4545
}
4646

47-
# Create the machine
4847
resource "libvirt_domain" "service-vm" {
4948
count = var.instance_count
5049
name = var.instance_count > 1 ? "${var.instance_hostname}-${count.index}" : var.instance_hostname
@@ -109,6 +108,13 @@ resource "libvirt_domain" "service-vm" {
109108
autoport = "true"
110109
}
111110

111+
# necessary when using UEFI
112+
lifecycle {
113+
ignore_changes = [
114+
nvram
115+
]
116+
}
117+
112118
xml {
113119
xslt = var.instance_type == "windows" ? file("${path.module}/windows-patch.xsl") : file("${path.module}/linux-patch.xsl")
114120
}

0 commit comments

Comments
 (0)