-
Bundle Configuration:
- You have a bundle named
hello-bundle
.
- Within this bundle, there’s a job called
hello-job
.
- The job has a single task (
hello-task
) associated with it.
- The task is a notebook task, and its notebook path is
./hello.py
.
-
Service Principals:
- You’ve defined two service principals:
principle_1
(associated with the job itself).
principle_2
(associated with the dev
target environment).
-
Use Case:
- You want to use
principle_1
for the hello-job
task, even though the default service principal for the dev
target environment is principle_2
.
-
Feasibility:
- Yes, it’s possible to achieve this by specifying the desired service principal at the task level, overriding the default one set for the target environment.
Here’s how you can modify your configuration to achieve this:
bundle:
name: hello-bundle
resources:
jobs:
hello-job:
name: hello-job
tasks:
- task_key: hello-task
existing_cluster_id: 1234-567890-abcde123
notebook_task:
notebook_path: ./hello.py
run_as:
service_principle_name: principle_1
targets:
dev:
default: true
run_as:
service_principle_name: principle_2
By explicitly setting the run_as
field within the hello-task
, you can ensure that it uses principle_1
regardless of the default service principal for the dev
environment. 🚀