Skip to content

Commit

Permalink
vSphere: ignore all bootstrap disk changes
Browse files Browse the repository at this point in the history
In some vSphere infrastructures the disk type
could change underneath terraform state causing
bootstrap delete to fail.

Ignore all bootstrap disk changes.
  • Loading branch information
jcpowermac committed Feb 15, 2023
1 parent b8d83ea commit 03e8979
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/data/vsphere/bootstrap/main.tf
Expand Up @@ -33,13 +33,13 @@ resource "vsphere_virtual_machine" "vm_bootstrap" {
eagerly_scrub = var.scrub_disk
thin_provisioned = var.thin_disk
}

lifecycle {
ignore_changes = [
disk[0].eagerly_scrub,
disk[0],
]
}


clone {
template_uuid = var.template
}
Expand Down
6 changes: 6 additions & 0 deletions data/data/vspherezoning/bootstrap/main.tf
Expand Up @@ -37,6 +37,12 @@ resource "vsphere_virtual_machine" "vm_bootstrap" {
thin_provisioned = var.template[0].disks.0.thin_provisioned
}

lifecycle {
ignore_changes = [
disk[0],
]
}

clone {
template_uuid = var.template[0].uuid
}
Expand Down

0 comments on commit 03e8979

Please sign in to comment.