│ Destroy-time provisioners and their connection configurations may only reference attributes of the related resource, via 'self', 'count.index', or 'each.key'. │ │ References to other resources during the destroy phase can cause dependency cycles and int

│ Destroy-time provisioners and their connection configurations may only reference attributes of the related resource, via ‘self’, ‘count.index’, or ‘each.key’.

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

provisioner “remote-exec” {
when = destroy
inline = [
“cd build-agent”,
“sudo ./svc.sh uninstall”,
]
on_failure = fail
connection {
type = “ssh”
user = var.login_vm_vm1
password = var.senha_vm_vm1
host =“testeamateu.eastus.cloudapp.azure.com
}
}