Skip to content

Substitutions ${resouces.jobs.<job_name>.id} not working #1750

@aleksei-disney-nd

Description

@aleksei-disney-nd

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:
  jobs:
    cron_job:
      name: cron_job_2
      tasks:
        - task_key: test_1
          run_job_task:
            job_id: ${resouces.jobs.job_a.id}
      queue:
        enabled: true

resources/job_a.yml

resources:
  jobs:

    job_a:
      name: job_a
      description: ""
      max_concurrent_runs: 1
      parameters:

job_a is deployed with no issue at all.

  1. databricks bundle deploy -t dev -p unity-nonprod states validation ok
  2. databricks bundle deploy -t dev -p unity-nonprod raises an error
Error: exit status 1

Error: 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.

As stated in the documentation I should be able to retrieve id dynamically with substitutions

The version i am running on is Databricks CLI v0.225.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    DABsDABs related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions