Unable to excute remote excution on multiple servers

Hi Team,
We are using centurylink cloud.
When we are trying to create servers i am unable to copy and executing scripts into remote servers.
Kindly suggest us.

provider “clc” {
username = “{var.user_name}" password = "{var.password}”

account = “${var.account}” # optional

}
resource “clc_server” “node” {
name_template = “{var.name_template}" source_server_id = "{var.source_server_id}”
group_id = “{var.group_id}" cpu = "{var.cpu}”
memory_mb = “{var.memory}" password = "{var.node_password}”
count = 2
additional_disks {
size_gb = 10
type = “raw”
device_name = “/dev/sdh”
}
provisioner “file” {
source = “/tmp/apache.sh”
destination = “/usr/local/apache.sh”
}
provisioner “remote-exec” {
inline = [
" sh /usr/local/apache.sh"
]
}
connection {

host = "${clc_server.node.0.private_ip_address}"

user = “root”

password = “${clc_server.node.password}”

}
}
resource “null_resource” “examplerr3” {
provisioner “local-exec” {
command = “echo {clc_server.node.id} ansible_host={clc_server.node.private_ip_address} > private_ips.txt”
}
}

Could you please try doing below steps:

  1. Add a connection block locally to all the provisioner block seperately.
  2. In the connection block, please specify below details:
    connection {
    type = “ssh”
    user = “USERID”
    private_key = “${file(”~/.ssh/id_rsa")}"
    }

There are few other parameters you could use and that should help. Looks like an issue where the connection is not being established.