# Error in Function call

**URL:** <https://discuss.hashicorp.com/t/error-in-function-call/6835>\
**Category:** Terraform\
**Created:** [March 16, 2020, 11:35am UTC](https://discuss.hashicorp.com/t/error-in-function-call/6835 "2020-03-16T11:35:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomHowarth](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tomhowarth/32/5351_2.png) [@TomHowarth](https://discuss.hashicorp.com/u/TomHowarth)\
**Post date:** [March 16, 2020, 11:35am UTC](https://discuss.hashicorp.com/t/error-in-function-call/6835/1 "2020-03-16T11:35:54Z")

</div>

I am using terraform remote to store my state, but since migrating a section of my code has stopped working stanza shown below

```
data "template_file" "user_data" {
   template = "${file("${path.module}\\user-data.sh")}"
}

```

when I run a terraform plan. I receive the following error

```
Error: Error in function call
 
on .terraform/modules/Webserver-cluster/webserver-cluster/main.tf line 26, in data "template_file" "user_data":
26: template = "${file("${path.module}\\user-data.sh")}"
     |----------------
     | path.module is ".terraform/modules/Webserver-cluster/webserver-cluster"
 
Call to function "file" failed: no file exists at
.terraform/modules/Webserver-cluster/webserver-cluster\user-data.sh.

```

The file is in the location shown.
