A continuous integration pipeline deploys a bundle to the prod target on every merge, using a service principal's credentials, and the deployed nightly job currently executes under whichever identity performed the deployment. Governance requires the job itself to execute under a named service principal, declared in the bundle so that it survives every future deployment. Which change to the bundle meets the requirement?
targets:
prod:
mode: production
workspace:
host: acme-prod.cloud.databricks.com- AAdd a permissions block to the prod target granting CAN_MANAGE on the job to the service principal, so that it becomes the identity the job executes under.
- BRely on mode: production in the prod target, since that mode makes every deployed job execute under a service principal rather than a user.
- CChange the job's run as identity in the workspace user interface after the deployment finishes, and record the value in the team's runbook.
- DAdd a run_as block to the prod target naming the service principal, so the deployed job executes under that identity on every deployment. Correct
Why A is wrong: Tempting because permissions is a real bundle key and the service principal does need access, but it controls who may view, manage or run the resource; the identity the tasks execute under is a separate setting and stays unchanged.
Why B is wrong: Tempting because production mode does tighten behaviour, keeping schedules active and names unprefixed, but it does not choose an execution identity by itself; it validates the configuration rather than supplying the principal.
Why C is wrong: Tempting because the interface does expose that setting and the change works immediately, but the bundle is the source of truth for the deployed job, so the next deployment overwrites the manual edit and the requirement fails silently.
Why D is correct: Correct: run_as sets the identity that the deployed resources execute under, and placing it in the prod target means each deployment of that target reasserts the service principal without any manual step.