When you define the policy_id in the target block then the variable doesn't make sense. For me works these:
I solved it for now, to override the value for policy_id in the target part:
targets:
dev:
workspace:
root_path: ~/DATABRICKS_BUNDLES
resources:
jobs:
read_data_lake:
name: read_data_lake
job_clusters:
- job_cluster_key: Job_cluster
new_cluster:
policy_id: <POLICY_ID from databricks-workspace-a>
tst:
workspace:
root_path: ~/DATABRICKS_BUNDLES
resources:
jobs:
read_data_lake:
name: read_data_lake
job_clusters:
- job_cluster_key: Job_cluster
new_cluster:
policy_id: <POLICY_ID from databricks-workspace-b>
I think it's useful for few jobs. When you have more then It's useless, because you must define each job in the target block to use your policy_id. If I missed something or am wrong, please let me know 🙂