Variables Warning: External references from destroy provisioners are deprecated


after updating to Terraform v0.12.19 I’ve already removed some of the External refrence Warnings as mentioned here:

But I don’t understand how to fix this warning:

  on ../../modules/dockerhost/ line 167, in resource "vsphere_virtual_machine" "vm":
 167:     private_key = file(var.private_key_path)

Destroy-time provisioners and their connection configurations may only
reference attributes of the related resource, via 'self', 'count.index', or

References to other resources during the destroy phase can cause dependency
cycles and interact poorly with create_before_destroy.

(and 7 more similar warnings elsewhere)


resource "vsphere_virtual_machine" "vm" {
  connection {
    host        = self.default_ip_address
    type        = "ssh"
    user        = "root"
    private_key = file(var.private_key_path)

What should private_key be to avoid dependency cycles ?

How do I see the other 7 more similar warnings ?

( is there a reverse to -compact-warnings ? )

ok there still seems to be some discussion going on at