Error: error parsing jobspec: error parsing IDENT string

Dear terraform community,

I am learning terraform and nomad, I have a nomad job which I can deploy in my nomad cluster using the nomad cli.

I am now trying to deploy the same nomad job using terraform. The main.tf file looks like:

provider "nomad" {
  address = "http://...:4646"
}

resource "nomad_job" "slurm_ctl" {
  jobspec = file("${path.module}/slurm-ctl.hcl")
}

Teraform validate apporoves the file, however terraform apply fails

❯ terraform apply
╷
│ Error: error parsing jobspec: error parsing: At 2:13: Unknown token: 2:13 IDENT string
│
│   with nomad_job.slurm_ctl,
│   on main.tf line 5, in resource "nomad_job" "slurm_ctl":
│    5: resource "nomad_job" "slurm_ctl" {
│
╵

my terraform version is

❯ terraform --version
Terraform v1.4.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/nomad v1.4.19

Could someone please give me a hint of where the issue is?

thank you very much

Umm… but your error message has already told you that there is an error parsing the jobspec, and specified the line and character within the line where that error occured.

What more information are you seeking?

I don’t see the error, I am comparing it with this one from official documentation

https://registry.terraform.io/providers/hashicorp/nomad/latest/docs#example-usage

or, what is IDENT?

ok, found the issue,

the problem was not my main.tf but the nomad job hcl file, the nomad job needed a variable not provided by terraform.

I still think the error message was not clear enough for newbies, it should at least say the error was in the nomal job hcl file and throw the nomad job to stderr