@@ -386,6 +386,8 @@ var resourcesMap map[string]importable = map[string]importable{
386386 {Path : "job_cluster.new_cluster.instance_pool_id" , Resource : "databricks_instance_pool" },
387387 {Path : "job_cluster.new_cluster.driver_instance_pool_id" , Resource : "databricks_instance_pool" },
388388 {Path : "job_cluster.new_cluster.policy_id" , Resource : "databricks_cluster_policy" },
389+ {Path : "run_as.user_name" , Resource : "databricks_user" , Match : "user_name" },
390+ {Path : "run_as.service_principal_name" , Resource : "databricks_service_principal" , Match : "application_id" },
389391 },
390392 Import : func (ic * importContext , r * resource ) error {
391393 var job jobs.JobSettings
@@ -513,6 +515,22 @@ var resourcesMap map[string]importable = map[string]importable{
513515 for _ , jc := range job .JobClusters {
514516 ic .importCluster (jc .NewCluster )
515517 }
518+ if job .RunAs != nil {
519+ if job .RunAs .UserName != "" {
520+ ic .Emit (& resource {
521+ Resource : "databricks_user" ,
522+ Attribute : "user_name" ,
523+ Value : job .RunAs .UserName ,
524+ })
525+ }
526+ if job .RunAs .ServicePrincipalName != "" {
527+ ic .Emit (& resource {
528+ Resource : "databricks_service_principal" ,
529+ Attribute : "application_id" ,
530+ Value : job .RunAs .ServicePrincipalName ,
531+ })
532+ }
533+ }
516534
517535 return ic .importLibraries (r .Data , s )
518536 },
0 commit comments