File provisioner unable to upload file or directory

Using a file provisioner to upload a file to a Windows ec2 instance, fails with
" timeout - last error: http response error: 502 - invalid content type"
Terrafrom version Terraform v0.13.3

This is my code snippet. The userdata part looks to work, in that it runs a powershell script on the new provisioned instance and the script creates a directory, but the file provisioner will not upload to either that directory or to another
I am running this via proxy server.

resource “aws_instance” “test_workstation” {
ami = “ami-05dcd4060b959959b”
instance_type = “t2.micro”
key_name = “test_key”
provider = “aws.uk_region”
user_data = “${file(”./modules/ec2_uk/test_ps.ps1")}"
get_password_data = “true”

provisioner “file” {
source = “./modules/ec2_uk/install_dir”
destination = “c:/test”

connection {
  type     = "winrm"
  user     = "Administrator"
  password = "${self.password_data}"
  host     = self.public_ip
}	

}
}

Hi @seconds78,
If you see in your destination your drive path is in small letter “c”, as you’re running in linux host it will be case sensitive, can you try with caps value?