Invalid function argument

Hi there ,
Im founding glitch in terraform code .
the error looks like:

Error: Invalid function argument

│ on main.tf line 70, in data “tls_public_key” “private_key_pem”:
│ 70: private_key_pem = file(“${var.pem_key_path}”)
│ ├────────────────
│ │ var.pem_key_path is “azure_vm_key.pem”

│ Invalid value for “path” parameter: no file exists at “azure_vm_key.pem”; 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.

Terraform already explained the problem directly in the error message:

Use the path module to specify where that file is relative to our module.

file("${path.module}/hello.txt")

Thanks @maxb and @gtirloni