Closed aleksei-disney-nd closed 2 months ago
Hi!
You have a typo in the world resources
in variables reference thus it's not replaced correctly
job_id: ${resouces.jobs.job_a.id}
-> job_id: ${resources.jobs.job_a.id}
hi @andrewnester it worked but now I am getting another error. What is weird is that for some jobs it does not raise an error
Warning: cannot parse "${resources.jobs.job_b.id}" as an integer
at resources.jobs.cron_job.tasks[0].run_job_task.job_id
in resources/cron_job.yml:8:21
Error: exit status 1
Error: Missing required argument
on bundle.tf.json line 31, in resource.databricks_job.cron_job.task[0].run_job_task:
31: "run_job_task": {},
The argument "job_id" is required, but no definition was found.
Can you share how job_b
job configuration look like? And also could you try to upgrade to the latest CLI (0.227.1) and see if the error persists?
@andrewnester I think I figured it out. my job name had a double under score so let's say its real name was job__b whereas the previous one was job_a. I tried removing one underscore and reference it as job_b and it worked just fine. I also changed job_a to job__a and it rasied the same error. Could you think of any workaround this bug other than not have double undersocre which wil be my choice if no other available. Thank you so much for all your help so far.
Indeed, double underscores are not supported in variable and resources names at the moment. There is no a workaround except renaming but we are aware of the issue and investigating a solution.
Describe the issue
I am trying to define a job workflow that is going to trigger another jobs.
my files is as follow:
resources/cron_job.yml
resources/job_a.yml
job_a is deployed with no issue at all.
databricks bundle deploy -t dev -p unity-nonprod
states validation okdatabricks bundle deploy -t dev -p unity-nonprod
raises an errorError: Reference to undeclared resource
on bundle.tf.json line 32, in resource.databricks_job.cron_job.task[0].run_job_task: 32: "job_id": "${resouces.jobs.job_a.id}"
A managed resource "resouces" "jobs" has not been declared in the root module.