terraform-provider-vsphere: Disk provisioning settings are not correctly applied based on provided arguments

Hello,

We create virtual machine with thick provisionning and LZT on nfs datastore (netapp),. At the end of creation, vSphere with datastore plugins (netapp) change eagerly_scrub from false to true automaticly.

At the next plan of the project, we have a error because of that. We have tested to ignore results

Terraform Version

Terraform v0.12.24
+ provider.template v2.1.2
+ provider.vsphere v1.17.1

Affected Resource(s)

  • vsphere_virtual_machine

Expected Behavior

Ignore change of eagerly_scrub parameter or provide a way to ignore this parameters on all disks.

Actual Behavior

On next plan, we have a error on disk who changes from LZT to EZT.

Important Factoids

We are force to do thick provisonning …

List of lifecycle ignore_changes, we tried :

lifecycle {
    ignore_changes = [
      disk["eagerly_scrub"],
    ]
}

We tried (seems not implemented) :

lifecycle {
    ignore_changes = [
      disk["all.eagerly_scrub"],
    ]
}
lifecycle {
    ignore_changes = [
      disk["*.eagerly_scrub"],
    ]
}

With index :

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

With label :

lifecycle {
    ignore_changes = [
      disk["disk0.eagerly_scrub"],
      disk["disk1.eagerly_scrub"],
    ]
}

The only one who works :

lifecycle {
    ignore_changes = [
      disk,
    ]
}

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 26
  • Comments: 26 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@jcpowermac I found exact message on plan :

Error: disk.0: virtual disk "disk0": cannot change the value of "eagerly_scrub" - (old: true new: false)

Hi, I also have problems here even when I’d set ignore_changes block in the lifecycle.