Destroy-time provisioner

Having some issues moving from .12.8 to lastest terraform.

My code:

resource "null_resource" "post_deploy_config" {
  depends_on = [module.nutanix_module]
  count      = var.resourcecount
  connection {
    type     = "ssh"
    host     = module.nutanix_module.vm_ip[count.index]
    user     = var.user
    password = var.pass
  provisioner "remote-exec" {
    inline = [<<EOF
/bin/sudo /bin/systemctl restart gitlab-runner
  provisioner "remote-exec" {
    when        = destroy
    on_failure  = continue
    inline = [<<EOF
sudo gitlab-runner unregister --all-runners

But seeing the following error:
$ terraform validate

Warning: External references from destroy provisioners are deprecated

on line 41, in resource “null_resource” “post_deploy_config”:
41: host = module.nutanix_module.vm_ips[count.index]

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 2 more similar warnings elsewhere)

I am unclear how to get around this.