Invalid function argument when using inline in remote-exec provisioner

Hi

I get the below error when using a provisioner “remote-exec” {} in my *.tf file. Without configuring a provisioner everything works:

  provisioner "remote-exec" {

    inline = [
            "chmod +x script.sh",
    ]

  }

Result after running: terraform apply:

Error: Invalid function argument: Invalid value for "path" parameter: no file exists at 27f8c7e236f215f88e55131dbe133526b1ddd7d67147d463e01f49bc27ae4e31; this function works only with files that are distributed as part of the configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an attribute of that resource.

So far I did not find any useful information about this error which is usually only the case when I’m totally on the wrong track.
Any tips what I’m doing wrong?
Best Roland

PS: I use terraform version 0.13.5 on ubuntu 20.04.1 LTS

Hi @bladnor,

It’s hard to guess what’s going on here because you’ve left so much information out of your question. This error message looks like one that the file function produces when it can’t find the file you specified, but since the snippet you shared doesn’t include a call to the file function the problem is presumably with a different part of the configuration that you’ve not included.