pulumi-databricks 1.77.0a1761975834__py3-none-any.whl → 1.79.0a1762839813__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_databricks/__init__.py +54 -46
- pulumi_databricks/_inputs.py +26079 -32918
- pulumi_databricks/account_federation_policy.py +44 -16
- pulumi_databricks/account_network_policy.py +56 -2
- pulumi_databricks/account_setting_v2.py +46 -83
- pulumi_databricks/alert_v2.py +168 -134
- pulumi_databricks/app.py +153 -0
- pulumi_databricks/apps_settings_custom_template.py +75 -52
- pulumi_databricks/budget_policy.py +6 -2
- pulumi_databricks/catalog.py +65 -23
- pulumi_databricks/cluster.py +47 -168
- pulumi_databricks/cluster_policy.py +120 -0
- pulumi_databricks/config/__init__.pyi +4 -0
- pulumi_databricks/config/vars.py +8 -0
- pulumi_databricks/data_quality_monitor.py +453 -0
- pulumi_databricks/data_quality_refresh.py +492 -0
- pulumi_databricks/database_database_catalog.py +9 -52
- pulumi_databricks/database_instance.py +271 -120
- pulumi_databricks/database_synced_database_table.py +239 -52
- pulumi_databricks/entitlements.py +21 -21
- pulumi_databricks/entity_tag_assignment.py +83 -52
- pulumi_databricks/external_location.py +131 -7
- pulumi_databricks/external_metadata.py +16 -59
- pulumi_databricks/feature_engineering_feature.py +480 -0
- pulumi_databricks/feature_engineering_materialized_feature.py +397 -0
- pulumi_databricks/file.py +2 -2
- pulumi_databricks/get_account_federation_policies.py +22 -3
- pulumi_databricks/get_account_federation_policy.py +12 -27
- pulumi_databricks/get_account_network_policies.py +4 -0
- pulumi_databricks/get_account_network_policy.py +9 -18
- pulumi_databricks/get_account_setting_v2.py +36 -141
- pulumi_databricks/get_alert_v2.py +41 -107
- pulumi_databricks/get_alerts_v2.py +29 -31
- pulumi_databricks/get_app.py +21 -5
- pulumi_databricks/get_apps.py +22 -6
- pulumi_databricks/get_apps_settings_custom_template.py +11 -55
- pulumi_databricks/get_apps_settings_custom_templates.py +25 -21
- pulumi_databricks/get_aws_assume_role_policy.py +14 -14
- pulumi_databricks/get_aws_bucket_policy.py +10 -10
- pulumi_databricks/get_aws_unity_catalog_assume_role_policy.py +10 -10
- pulumi_databricks/get_aws_unity_catalog_policy.py +10 -10
- pulumi_databricks/get_budget_policies.py +70 -6
- pulumi_databricks/get_budget_policy.py +9 -32
- pulumi_databricks/get_catalog.py +21 -4
- pulumi_databricks/get_catalogs.py +23 -4
- pulumi_databricks/get_cluster.py +75 -4
- pulumi_databricks/get_cluster_policy.py +23 -4
- pulumi_databricks/get_clusters.py +21 -4
- pulumi_databricks/get_current_config.py +4 -4
- pulumi_databricks/get_current_metastore.py +21 -4
- pulumi_databricks/get_dashboards.py +20 -4
- pulumi_databricks/get_data_quality_monitor.py +210 -0
- pulumi_databricks/get_data_quality_monitors.py +143 -0
- pulumi_databricks/get_data_quality_refresh.py +270 -0
- pulumi_databricks/get_data_quality_refreshes.py +207 -0
- pulumi_databricks/get_database_database_catalog.py +10 -41
- pulumi_databricks/get_database_database_catalogs.py +37 -18
- pulumi_databricks/get_database_instance.py +93 -99
- pulumi_databricks/get_database_instances.py +20 -16
- pulumi_databricks/get_database_synced_database_table.py +11 -49
- pulumi_databricks/get_database_synced_database_tables.py +42 -23
- pulumi_databricks/get_directory.py +20 -1
- pulumi_databricks/get_entity_tag_assignment.py +63 -30
- pulumi_databricks/get_entity_tag_assignments.py +69 -23
- pulumi_databricks/get_external_location.py +21 -4
- pulumi_databricks/get_external_locations.py +23 -4
- pulumi_databricks/get_external_metadata.py +18 -73
- pulumi_databricks/get_external_metadatas.py +22 -16
- pulumi_databricks/get_feature_engineering_feature.py +179 -0
- pulumi_databricks/get_feature_engineering_features.py +103 -0
- pulumi_databricks/get_feature_engineering_materialized_feature.py +180 -0
- pulumi_databricks/get_feature_engineering_materialized_features.py +123 -0
- pulumi_databricks/get_functions.py +16 -1
- pulumi_databricks/get_instance_profiles.py +21 -4
- pulumi_databricks/get_jobs.py +23 -4
- pulumi_databricks/get_materialized_features_feature_tag.py +7 -32
- pulumi_databricks/get_materialized_features_feature_tags.py +50 -18
- pulumi_databricks/get_metastore.py +6 -6
- pulumi_databricks/get_mlflow_experiment.py +18 -1
- pulumi_databricks/get_mlflow_model.py +18 -1
- pulumi_databricks/get_mlflow_models.py +23 -4
- pulumi_databricks/get_node_type.py +42 -5
- pulumi_databricks/get_notebook.py +20 -1
- pulumi_databricks/get_notification_destinations.py +17 -1
- pulumi_databricks/get_online_store.py +11 -38
- pulumi_databricks/get_online_stores.py +20 -18
- pulumi_databricks/get_pipelines.py +23 -4
- pulumi_databricks/get_policy_info.py +21 -109
- pulumi_databricks/get_policy_infos.py +50 -25
- pulumi_databricks/get_quality_monitor_v2.py +8 -21
- pulumi_databricks/get_quality_monitors_v2.py +23 -25
- pulumi_databricks/get_registered_model.py +19 -4
- pulumi_databricks/get_registered_model_versions.py +19 -4
- pulumi_databricks/get_rfa_access_request_destinations.py +126 -0
- pulumi_databricks/get_schema.py +18 -1
- pulumi_databricks/get_schemas.py +23 -4
- pulumi_databricks/get_service_principal_federation_policies.py +23 -4
- pulumi_databricks/get_service_principal_federation_policy.py +15 -24
- pulumi_databricks/get_service_principals.py +64 -0
- pulumi_databricks/get_serving_endpoints.py +19 -4
- pulumi_databricks/get_share.py +117 -18
- pulumi_databricks/get_shares.py +22 -3
- pulumi_databricks/get_spark_version.py +20 -1
- pulumi_databricks/get_sql_warehouse.py +16 -1
- pulumi_databricks/get_sql_warehouses.py +20 -1
- pulumi_databricks/get_storage_credential.py +18 -1
- pulumi_databricks/get_storage_credentials.py +23 -4
- pulumi_databricks/get_table.py +18 -1
- pulumi_databricks/get_tables.py +20 -1
- pulumi_databricks/get_tag_policies.py +55 -23
- pulumi_databricks/get_tag_policy.py +60 -40
- pulumi_databricks/get_views.py +20 -1
- pulumi_databricks/get_volume.py +18 -1
- pulumi_databricks/get_volumes.py +20 -1
- pulumi_databricks/get_workspace_network_option.py +8 -16
- pulumi_databricks/get_workspace_setting_v2.py +41 -163
- pulumi_databricks/get_zones.py +20 -1
- pulumi_databricks/git_credential.py +54 -7
- pulumi_databricks/group.py +21 -21
- pulumi_databricks/instance_profile.py +0 -182
- pulumi_databricks/job.py +47 -0
- pulumi_databricks/library.py +165 -0
- pulumi_databricks/materialized_features_feature_tag.py +9 -52
- pulumi_databricks/metastore.py +81 -7
- pulumi_databricks/metastore_data_access.py +48 -0
- pulumi_databricks/mlflow_webhook.py +4 -4
- pulumi_databricks/mws_credentials.py +10 -10
- pulumi_databricks/mws_customer_managed_keys.py +0 -288
- pulumi_databricks/mws_log_delivery.py +146 -0
- pulumi_databricks/mws_storage_configurations.py +16 -16
- pulumi_databricks/mws_vpc_endpoint.py +56 -56
- pulumi_databricks/mws_workspaces.py +146 -65
- pulumi_databricks/notebook.py +49 -0
- pulumi_databricks/online_store.py +9 -52
- pulumi_databricks/outputs.py +11885 -13474
- pulumi_databricks/permission_assignment.py +299 -8
- pulumi_databricks/permissions.py +6 -6
- pulumi_databricks/pipeline.py +37 -3
- pulumi_databricks/policy_info.py +9 -52
- pulumi_databricks/provider.py +36 -1
- pulumi_databricks/pulumi-plugin.json +1 -1
- pulumi_databricks/quality_monitor.py +47 -0
- pulumi_databricks/quality_monitor_v2.py +9 -52
- pulumi_databricks/recipient.py +74 -0
- pulumi_databricks/registered_model.py +308 -36
- pulumi_databricks/rfa_access_request_destinations.py +286 -0
- pulumi_databricks/schema.py +7 -7
- pulumi_databricks/service_principal_federation_policy.py +48 -16
- pulumi_databricks/share.py +71 -84
- pulumi_databricks/sql_table.py +42 -14
- pulumi_databricks/storage_credential.py +15 -2
- pulumi_databricks/tag_policy.py +111 -54
- pulumi_databricks/user.py +21 -21
- pulumi_databricks/volume.py +7 -7
- pulumi_databricks/workspace_binding.py +0 -48
- pulumi_databricks/workspace_network_option.py +6 -2
- pulumi_databricks/workspace_setting_v2.py +49 -133
- {pulumi_databricks-1.77.0a1761975834.dist-info → pulumi_databricks-1.79.0a1762839813.dist-info}/METADATA +1 -1
- pulumi_databricks-1.79.0a1762839813.dist-info/RECORD +250 -0
- pulumi_databricks/clean_room_asset.py +0 -938
- pulumi_databricks/clean_room_auto_approval_rule.py +0 -473
- pulumi_databricks/clean_rooms_clean_room.py +0 -569
- pulumi_databricks/get_clean_room_asset.py +0 -416
- pulumi_databricks/get_clean_room_asset_revisions_clean_room_asset.py +0 -392
- pulumi_databricks/get_clean_room_asset_revisions_clean_room_assets.py +0 -121
- pulumi_databricks/get_clean_room_assets.py +0 -146
- pulumi_databricks/get_clean_room_auto_approval_rule.py +0 -217
- pulumi_databricks/get_clean_room_auto_approval_rules.py +0 -101
- pulumi_databricks/get_clean_rooms_clean_room.py +0 -289
- pulumi_databricks/get_clean_rooms_clean_rooms.py +0 -125
- pulumi_databricks/get_recipient_federation_policies.py +0 -101
- pulumi_databricks/get_recipient_federation_policy.py +0 -182
- pulumi_databricks/recipient_federation_policy.py +0 -393
- pulumi_databricks-1.77.0a1761975834.dist-info/RECORD +0 -250
- {pulumi_databricks-1.77.0a1761975834.dist-info → pulumi_databricks-1.79.0a1762839813.dist-info}/WHEEL +0 -0
- {pulumi_databricks-1.77.0a1761975834.dist-info → pulumi_databricks-1.79.0a1762839813.dist-info}/top_level.txt +0 -0
pulumi_databricks/cluster.py
CHANGED
|
@@ -49,6 +49,7 @@ class ClusterArgs:
|
|
|
49
49
|
node_type_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
50
50
|
num_workers: Optional[pulumi.Input[_builtins.int]] = None,
|
|
51
51
|
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
52
|
+
provider_config: Optional[pulumi.Input['ClusterProviderConfigArgs']] = None,
|
|
52
53
|
remote_disk_throughput: Optional[pulumi.Input[_builtins.int]] = None,
|
|
53
54
|
runtime_engine: Optional[pulumi.Input[_builtins.str]] = None,
|
|
54
55
|
single_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
@@ -99,33 +100,10 @@ class ClusterArgs:
|
|
|
99
100
|
:param pulumi.Input[_builtins.bool] is_single_node: When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`, and `num_workers`.
|
|
100
101
|
:param pulumi.Input[_builtins.str] kind: The kind of compute described by this compute specification. Possible values (see [API docs](https://docs.databricks.com/api/workspace/clusters/create#kind) for full list): `CLASSIC_PREVIEW` (if corresponding public preview is enabled).
|
|
101
102
|
:param pulumi.Input[_builtins.bool] no_wait: If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
102
|
-
|
|
103
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
104
|
-
|
|
105
|
-
```python
|
|
106
|
-
import pulumi
|
|
107
|
-
import pulumi_databricks as databricks
|
|
108
|
-
|
|
109
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
110
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
111
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
112
|
-
cluster_name="Shared Autoscaling",
|
|
113
|
-
spark_version=latest_lts.id,
|
|
114
|
-
node_type_id=smallest.id,
|
|
115
|
-
autotermination_minutes=20,
|
|
116
|
-
autoscale={
|
|
117
|
-
"min_workers": 1,
|
|
118
|
-
"max_workers": 50,
|
|
119
|
-
},
|
|
120
|
-
spark_conf={
|
|
121
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
122
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
123
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
124
|
-
})
|
|
125
|
-
```
|
|
126
103
|
:param pulumi.Input[_builtins.str] node_type_id: Any supported get_node_type id. If `instance_pool_id` is specified, this field is not needed.
|
|
127
104
|
:param pulumi.Input[_builtins.int] num_workers: Number of worker nodes that this cluster should have. A cluster has one Spark driver and `num_workers` executors for a total of `num_workers` + 1 Spark nodes.
|
|
128
105
|
:param pulumi.Input[_builtins.str] policy_id: Identifier of Cluster Policy to validate cluster and preset certain defaults. *The primary use for cluster policies is to allow users to create policy-scoped clusters via UI rather than sharing configuration for API-created clusters.* For example, when you specify `policy_id` of [external metastore](https://docs.databricks.com/administration-guide/clusters/policies.html#external-metastore-policy) policy, you still have to fill in relevant keys for `spark_conf`. If relevant fields aren't filled in, then it will cause the configuration drift detected on each plan/apply, and Pulumi will try to apply the detected changes.
|
|
106
|
+
:param pulumi.Input['ClusterProviderConfigArgs'] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
|
|
129
107
|
:param pulumi.Input[_builtins.str] runtime_engine: The type of runtime engine to use. If not specified, the runtime engine type is inferred based on the spark_version value. Allowed values include: `PHOTON`, `STANDARD`.
|
|
130
108
|
:param pulumi.Input[_builtins.str] single_user_name: The optional user name of the user (or group name if `kind` if specified) to assign to an interactive cluster. This field is required when using `data_security_mode` set to `SINGLE_USER` or AAD Passthrough for Azure Data Lake Storage (ADLS) with a single-user cluster (i.e., not high-concurrency clusters).
|
|
131
109
|
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] spark_conf: should have following items:
|
|
@@ -190,6 +168,8 @@ class ClusterArgs:
|
|
|
190
168
|
pulumi.set(__self__, "num_workers", num_workers)
|
|
191
169
|
if policy_id is not None:
|
|
192
170
|
pulumi.set(__self__, "policy_id", policy_id)
|
|
171
|
+
if provider_config is not None:
|
|
172
|
+
pulumi.set(__self__, "provider_config", provider_config)
|
|
193
173
|
if remote_disk_throughput is not None:
|
|
194
174
|
pulumi.set(__self__, "remote_disk_throughput", remote_disk_throughput)
|
|
195
175
|
if runtime_engine is not None:
|
|
@@ -498,30 +478,6 @@ class ClusterArgs:
|
|
|
498
478
|
def no_wait(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
499
479
|
"""
|
|
500
480
|
If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
501
|
-
|
|
502
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
503
|
-
|
|
504
|
-
```python
|
|
505
|
-
import pulumi
|
|
506
|
-
import pulumi_databricks as databricks
|
|
507
|
-
|
|
508
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
509
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
510
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
511
|
-
cluster_name="Shared Autoscaling",
|
|
512
|
-
spark_version=latest_lts.id,
|
|
513
|
-
node_type_id=smallest.id,
|
|
514
|
-
autotermination_minutes=20,
|
|
515
|
-
autoscale={
|
|
516
|
-
"min_workers": 1,
|
|
517
|
-
"max_workers": 50,
|
|
518
|
-
},
|
|
519
|
-
spark_conf={
|
|
520
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
521
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
522
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
523
|
-
})
|
|
524
|
-
```
|
|
525
481
|
"""
|
|
526
482
|
return pulumi.get(self, "no_wait")
|
|
527
483
|
|
|
@@ -565,6 +521,18 @@ class ClusterArgs:
|
|
|
565
521
|
def policy_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
566
522
|
pulumi.set(self, "policy_id", value)
|
|
567
523
|
|
|
524
|
+
@_builtins.property
|
|
525
|
+
@pulumi.getter(name="providerConfig")
|
|
526
|
+
def provider_config(self) -> Optional[pulumi.Input['ClusterProviderConfigArgs']]:
|
|
527
|
+
"""
|
|
528
|
+
Configure the provider for management through account provider. This block consists of the following fields:
|
|
529
|
+
"""
|
|
530
|
+
return pulumi.get(self, "provider_config")
|
|
531
|
+
|
|
532
|
+
@provider_config.setter
|
|
533
|
+
def provider_config(self, value: Optional[pulumi.Input['ClusterProviderConfigArgs']]):
|
|
534
|
+
pulumi.set(self, "provider_config", value)
|
|
535
|
+
|
|
568
536
|
@_builtins.property
|
|
569
537
|
@pulumi.getter(name="remoteDiskThroughput")
|
|
570
538
|
def remote_disk_throughput(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
@@ -699,6 +667,7 @@ class _ClusterState:
|
|
|
699
667
|
node_type_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
700
668
|
num_workers: Optional[pulumi.Input[_builtins.int]] = None,
|
|
701
669
|
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
670
|
+
provider_config: Optional[pulumi.Input['ClusterProviderConfigArgs']] = None,
|
|
702
671
|
remote_disk_throughput: Optional[pulumi.Input[_builtins.int]] = None,
|
|
703
672
|
runtime_engine: Optional[pulumi.Input[_builtins.str]] = None,
|
|
704
673
|
single_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
@@ -752,33 +721,10 @@ class _ClusterState:
|
|
|
752
721
|
:param pulumi.Input[_builtins.bool] is_single_node: When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`, and `num_workers`.
|
|
753
722
|
:param pulumi.Input[_builtins.str] kind: The kind of compute described by this compute specification. Possible values (see [API docs](https://docs.databricks.com/api/workspace/clusters/create#kind) for full list): `CLASSIC_PREVIEW` (if corresponding public preview is enabled).
|
|
754
723
|
:param pulumi.Input[_builtins.bool] no_wait: If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
755
|
-
|
|
756
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
757
|
-
|
|
758
|
-
```python
|
|
759
|
-
import pulumi
|
|
760
|
-
import pulumi_databricks as databricks
|
|
761
|
-
|
|
762
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
763
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
764
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
765
|
-
cluster_name="Shared Autoscaling",
|
|
766
|
-
spark_version=latest_lts.id,
|
|
767
|
-
node_type_id=smallest.id,
|
|
768
|
-
autotermination_minutes=20,
|
|
769
|
-
autoscale={
|
|
770
|
-
"min_workers": 1,
|
|
771
|
-
"max_workers": 50,
|
|
772
|
-
},
|
|
773
|
-
spark_conf={
|
|
774
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
775
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
776
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
777
|
-
})
|
|
778
|
-
```
|
|
779
724
|
:param pulumi.Input[_builtins.str] node_type_id: Any supported get_node_type id. If `instance_pool_id` is specified, this field is not needed.
|
|
780
725
|
:param pulumi.Input[_builtins.int] num_workers: Number of worker nodes that this cluster should have. A cluster has one Spark driver and `num_workers` executors for a total of `num_workers` + 1 Spark nodes.
|
|
781
726
|
:param pulumi.Input[_builtins.str] policy_id: Identifier of Cluster Policy to validate cluster and preset certain defaults. *The primary use for cluster policies is to allow users to create policy-scoped clusters via UI rather than sharing configuration for API-created clusters.* For example, when you specify `policy_id` of [external metastore](https://docs.databricks.com/administration-guide/clusters/policies.html#external-metastore-policy) policy, you still have to fill in relevant keys for `spark_conf`. If relevant fields aren't filled in, then it will cause the configuration drift detected on each plan/apply, and Pulumi will try to apply the detected changes.
|
|
727
|
+
:param pulumi.Input['ClusterProviderConfigArgs'] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
|
|
782
728
|
:param pulumi.Input[_builtins.str] runtime_engine: The type of runtime engine to use. If not specified, the runtime engine type is inferred based on the spark_version value. Allowed values include: `PHOTON`, `STANDARD`.
|
|
783
729
|
:param pulumi.Input[_builtins.str] single_user_name: The optional user name of the user (or group name if `kind` if specified) to assign to an interactive cluster. This field is required when using `data_security_mode` set to `SINGLE_USER` or AAD Passthrough for Azure Data Lake Storage (ADLS) with a single-user cluster (i.e., not high-concurrency clusters).
|
|
784
730
|
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] spark_conf: should have following items:
|
|
@@ -848,6 +794,8 @@ class _ClusterState:
|
|
|
848
794
|
pulumi.set(__self__, "num_workers", num_workers)
|
|
849
795
|
if policy_id is not None:
|
|
850
796
|
pulumi.set(__self__, "policy_id", policy_id)
|
|
797
|
+
if provider_config is not None:
|
|
798
|
+
pulumi.set(__self__, "provider_config", provider_config)
|
|
851
799
|
if remote_disk_throughput is not None:
|
|
852
800
|
pulumi.set(__self__, "remote_disk_throughput", remote_disk_throughput)
|
|
853
801
|
if runtime_engine is not None:
|
|
@@ -1171,30 +1119,6 @@ class _ClusterState:
|
|
|
1171
1119
|
def no_wait(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
1172
1120
|
"""
|
|
1173
1121
|
If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
1174
|
-
|
|
1175
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
1176
|
-
|
|
1177
|
-
```python
|
|
1178
|
-
import pulumi
|
|
1179
|
-
import pulumi_databricks as databricks
|
|
1180
|
-
|
|
1181
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
1182
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
1183
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
1184
|
-
cluster_name="Shared Autoscaling",
|
|
1185
|
-
spark_version=latest_lts.id,
|
|
1186
|
-
node_type_id=smallest.id,
|
|
1187
|
-
autotermination_minutes=20,
|
|
1188
|
-
autoscale={
|
|
1189
|
-
"min_workers": 1,
|
|
1190
|
-
"max_workers": 50,
|
|
1191
|
-
},
|
|
1192
|
-
spark_conf={
|
|
1193
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
1194
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
1195
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
1196
|
-
})
|
|
1197
|
-
```
|
|
1198
1122
|
"""
|
|
1199
1123
|
return pulumi.get(self, "no_wait")
|
|
1200
1124
|
|
|
@@ -1238,6 +1162,18 @@ class _ClusterState:
|
|
|
1238
1162
|
def policy_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
1239
1163
|
pulumi.set(self, "policy_id", value)
|
|
1240
1164
|
|
|
1165
|
+
@_builtins.property
|
|
1166
|
+
@pulumi.getter(name="providerConfig")
|
|
1167
|
+
def provider_config(self) -> Optional[pulumi.Input['ClusterProviderConfigArgs']]:
|
|
1168
|
+
"""
|
|
1169
|
+
Configure the provider for management through account provider. This block consists of the following fields:
|
|
1170
|
+
"""
|
|
1171
|
+
return pulumi.get(self, "provider_config")
|
|
1172
|
+
|
|
1173
|
+
@provider_config.setter
|
|
1174
|
+
def provider_config(self, value: Optional[pulumi.Input['ClusterProviderConfigArgs']]):
|
|
1175
|
+
pulumi.set(self, "provider_config", value)
|
|
1176
|
+
|
|
1241
1177
|
@_builtins.property
|
|
1242
1178
|
@pulumi.getter(name="remoteDiskThroughput")
|
|
1243
1179
|
def remote_disk_throughput(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
@@ -1406,6 +1342,7 @@ class Cluster(pulumi.CustomResource):
|
|
|
1406
1342
|
node_type_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1407
1343
|
num_workers: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1408
1344
|
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1345
|
+
provider_config: Optional[pulumi.Input[Union['ClusterProviderConfigArgs', 'ClusterProviderConfigArgsDict']]] = None,
|
|
1409
1346
|
remote_disk_throughput: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1410
1347
|
runtime_engine: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1411
1348
|
single_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
@@ -1468,33 +1405,10 @@ class Cluster(pulumi.CustomResource):
|
|
|
1468
1405
|
:param pulumi.Input[_builtins.bool] is_single_node: When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`, and `num_workers`.
|
|
1469
1406
|
:param pulumi.Input[_builtins.str] kind: The kind of compute described by this compute specification. Possible values (see [API docs](https://docs.databricks.com/api/workspace/clusters/create#kind) for full list): `CLASSIC_PREVIEW` (if corresponding public preview is enabled).
|
|
1470
1407
|
:param pulumi.Input[_builtins.bool] no_wait: If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
1471
|
-
|
|
1472
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
1473
|
-
|
|
1474
|
-
```python
|
|
1475
|
-
import pulumi
|
|
1476
|
-
import pulumi_databricks as databricks
|
|
1477
|
-
|
|
1478
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
1479
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
1480
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
1481
|
-
cluster_name="Shared Autoscaling",
|
|
1482
|
-
spark_version=latest_lts.id,
|
|
1483
|
-
node_type_id=smallest.id,
|
|
1484
|
-
autotermination_minutes=20,
|
|
1485
|
-
autoscale={
|
|
1486
|
-
"min_workers": 1,
|
|
1487
|
-
"max_workers": 50,
|
|
1488
|
-
},
|
|
1489
|
-
spark_conf={
|
|
1490
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
1491
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
1492
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
1493
|
-
})
|
|
1494
|
-
```
|
|
1495
1408
|
:param pulumi.Input[_builtins.str] node_type_id: Any supported get_node_type id. If `instance_pool_id` is specified, this field is not needed.
|
|
1496
1409
|
:param pulumi.Input[_builtins.int] num_workers: Number of worker nodes that this cluster should have. A cluster has one Spark driver and `num_workers` executors for a total of `num_workers` + 1 Spark nodes.
|
|
1497
1410
|
:param pulumi.Input[_builtins.str] policy_id: Identifier of Cluster Policy to validate cluster and preset certain defaults. *The primary use for cluster policies is to allow users to create policy-scoped clusters via UI rather than sharing configuration for API-created clusters.* For example, when you specify `policy_id` of [external metastore](https://docs.databricks.com/administration-guide/clusters/policies.html#external-metastore-policy) policy, you still have to fill in relevant keys for `spark_conf`. If relevant fields aren't filled in, then it will cause the configuration drift detected on each plan/apply, and Pulumi will try to apply the detected changes.
|
|
1411
|
+
:param pulumi.Input[Union['ClusterProviderConfigArgs', 'ClusterProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
|
|
1498
1412
|
:param pulumi.Input[_builtins.str] runtime_engine: The type of runtime engine to use. If not specified, the runtime engine type is inferred based on the spark_version value. Allowed values include: `PHOTON`, `STANDARD`.
|
|
1499
1413
|
:param pulumi.Input[_builtins.str] single_user_name: The optional user name of the user (or group name if `kind` if specified) to assign to an interactive cluster. This field is required when using `data_security_mode` set to `SINGLE_USER` or AAD Passthrough for Azure Data Lake Storage (ADLS) with a single-user cluster (i.e., not high-concurrency clusters).
|
|
1500
1414
|
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] spark_conf: should have following items:
|
|
@@ -1564,6 +1478,7 @@ class Cluster(pulumi.CustomResource):
|
|
|
1564
1478
|
node_type_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1565
1479
|
num_workers: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1566
1480
|
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1481
|
+
provider_config: Optional[pulumi.Input[Union['ClusterProviderConfigArgs', 'ClusterProviderConfigArgsDict']]] = None,
|
|
1567
1482
|
remote_disk_throughput: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1568
1483
|
runtime_engine: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1569
1484
|
single_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
@@ -1610,6 +1525,7 @@ class Cluster(pulumi.CustomResource):
|
|
|
1610
1525
|
__props__.__dict__["node_type_id"] = node_type_id
|
|
1611
1526
|
__props__.__dict__["num_workers"] = num_workers
|
|
1612
1527
|
__props__.__dict__["policy_id"] = policy_id
|
|
1528
|
+
__props__.__dict__["provider_config"] = provider_config
|
|
1613
1529
|
__props__.__dict__["remote_disk_throughput"] = remote_disk_throughput
|
|
1614
1530
|
__props__.__dict__["runtime_engine"] = runtime_engine
|
|
1615
1531
|
__props__.__dict__["single_user_name"] = single_user_name
|
|
@@ -1665,6 +1581,7 @@ class Cluster(pulumi.CustomResource):
|
|
|
1665
1581
|
node_type_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1666
1582
|
num_workers: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1667
1583
|
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1584
|
+
provider_config: Optional[pulumi.Input[Union['ClusterProviderConfigArgs', 'ClusterProviderConfigArgsDict']]] = None,
|
|
1668
1585
|
remote_disk_throughput: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1669
1586
|
runtime_engine: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1670
1587
|
single_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
@@ -1723,33 +1640,10 @@ class Cluster(pulumi.CustomResource):
|
|
|
1723
1640
|
:param pulumi.Input[_builtins.bool] is_single_node: When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`, and `num_workers`.
|
|
1724
1641
|
:param pulumi.Input[_builtins.str] kind: The kind of compute described by this compute specification. Possible values (see [API docs](https://docs.databricks.com/api/workspace/clusters/create#kind) for full list): `CLASSIC_PREVIEW` (if corresponding public preview is enabled).
|
|
1725
1642
|
:param pulumi.Input[_builtins.bool] no_wait: If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
1726
|
-
|
|
1727
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
1728
|
-
|
|
1729
|
-
```python
|
|
1730
|
-
import pulumi
|
|
1731
|
-
import pulumi_databricks as databricks
|
|
1732
|
-
|
|
1733
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
1734
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
1735
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
1736
|
-
cluster_name="Shared Autoscaling",
|
|
1737
|
-
spark_version=latest_lts.id,
|
|
1738
|
-
node_type_id=smallest.id,
|
|
1739
|
-
autotermination_minutes=20,
|
|
1740
|
-
autoscale={
|
|
1741
|
-
"min_workers": 1,
|
|
1742
|
-
"max_workers": 50,
|
|
1743
|
-
},
|
|
1744
|
-
spark_conf={
|
|
1745
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
1746
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
1747
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
1748
|
-
})
|
|
1749
|
-
```
|
|
1750
1643
|
:param pulumi.Input[_builtins.str] node_type_id: Any supported get_node_type id. If `instance_pool_id` is specified, this field is not needed.
|
|
1751
1644
|
:param pulumi.Input[_builtins.int] num_workers: Number of worker nodes that this cluster should have. A cluster has one Spark driver and `num_workers` executors for a total of `num_workers` + 1 Spark nodes.
|
|
1752
1645
|
:param pulumi.Input[_builtins.str] policy_id: Identifier of Cluster Policy to validate cluster and preset certain defaults. *The primary use for cluster policies is to allow users to create policy-scoped clusters via UI rather than sharing configuration for API-created clusters.* For example, when you specify `policy_id` of [external metastore](https://docs.databricks.com/administration-guide/clusters/policies.html#external-metastore-policy) policy, you still have to fill in relevant keys for `spark_conf`. If relevant fields aren't filled in, then it will cause the configuration drift detected on each plan/apply, and Pulumi will try to apply the detected changes.
|
|
1646
|
+
:param pulumi.Input[Union['ClusterProviderConfigArgs', 'ClusterProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
|
|
1753
1647
|
:param pulumi.Input[_builtins.str] runtime_engine: The type of runtime engine to use. If not specified, the runtime engine type is inferred based on the spark_version value. Allowed values include: `PHOTON`, `STANDARD`.
|
|
1754
1648
|
:param pulumi.Input[_builtins.str] single_user_name: The optional user name of the user (or group name if `kind` if specified) to assign to an interactive cluster. This field is required when using `data_security_mode` set to `SINGLE_USER` or AAD Passthrough for Azure Data Lake Storage (ADLS) with a single-user cluster (i.e., not high-concurrency clusters).
|
|
1755
1649
|
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] spark_conf: should have following items:
|
|
@@ -1794,6 +1688,7 @@ class Cluster(pulumi.CustomResource):
|
|
|
1794
1688
|
__props__.__dict__["node_type_id"] = node_type_id
|
|
1795
1689
|
__props__.__dict__["num_workers"] = num_workers
|
|
1796
1690
|
__props__.__dict__["policy_id"] = policy_id
|
|
1691
|
+
__props__.__dict__["provider_config"] = provider_config
|
|
1797
1692
|
__props__.__dict__["remote_disk_throughput"] = remote_disk_throughput
|
|
1798
1693
|
__props__.__dict__["runtime_engine"] = runtime_engine
|
|
1799
1694
|
__props__.__dict__["single_user_name"] = single_user_name
|
|
@@ -2006,30 +1901,6 @@ class Cluster(pulumi.CustomResource):
|
|
|
2006
1901
|
def no_wait(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
2007
1902
|
"""
|
|
2008
1903
|
If true, the provider will not wait for the cluster to reach `RUNNING` state when creating the cluster, allowing cluster creation and library installation to continue asynchronously. Defaults to false (the provider will wait for cluster creation and library installation to succeed).
|
|
2009
|
-
|
|
2010
|
-
The following example demonstrates how to create an autoscaling cluster with [Delta Cache](https://docs.databricks.com/delta/optimizations/delta-cache.html) enabled:
|
|
2011
|
-
|
|
2012
|
-
```python
|
|
2013
|
-
import pulumi
|
|
2014
|
-
import pulumi_databricks as databricks
|
|
2015
|
-
|
|
2016
|
-
smallest = databricks.get_node_type(local_disk=True)
|
|
2017
|
-
latest_lts = databricks.get_spark_version(long_term_support=True)
|
|
2018
|
-
shared_autoscaling = databricks.Cluster("shared_autoscaling",
|
|
2019
|
-
cluster_name="Shared Autoscaling",
|
|
2020
|
-
spark_version=latest_lts.id,
|
|
2021
|
-
node_type_id=smallest.id,
|
|
2022
|
-
autotermination_minutes=20,
|
|
2023
|
-
autoscale={
|
|
2024
|
-
"min_workers": 1,
|
|
2025
|
-
"max_workers": 50,
|
|
2026
|
-
},
|
|
2027
|
-
spark_conf={
|
|
2028
|
-
"spark.databricks.io.cache.enabled": "true",
|
|
2029
|
-
"spark.databricks.io.cache.maxDiskUsage": "50g",
|
|
2030
|
-
"spark.databricks.io.cache.maxMetaDataCache": "1g",
|
|
2031
|
-
})
|
|
2032
|
-
```
|
|
2033
1904
|
"""
|
|
2034
1905
|
return pulumi.get(self, "no_wait")
|
|
2035
1906
|
|
|
@@ -2057,6 +1928,14 @@ class Cluster(pulumi.CustomResource):
|
|
|
2057
1928
|
"""
|
|
2058
1929
|
return pulumi.get(self, "policy_id")
|
|
2059
1930
|
|
|
1931
|
+
@_builtins.property
|
|
1932
|
+
@pulumi.getter(name="providerConfig")
|
|
1933
|
+
def provider_config(self) -> pulumi.Output[Optional['outputs.ClusterProviderConfig']]:
|
|
1934
|
+
"""
|
|
1935
|
+
Configure the provider for management through account provider. This block consists of the following fields:
|
|
1936
|
+
"""
|
|
1937
|
+
return pulumi.get(self, "provider_config")
|
|
1938
|
+
|
|
2060
1939
|
@_builtins.property
|
|
2061
1940
|
@pulumi.getter(name="remoteDiskThroughput")
|
|
2062
1941
|
def remote_disk_throughput(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
@@ -298,6 +298,66 @@ class ClusterPolicy(pulumi.CustomResource):
|
|
|
298
298
|
* A user who has both cluster create permission and access to cluster policies can select the Free form policy and policies they have access to.
|
|
299
299
|
* A user that has access to only cluster policies, can select the policies they have access to.
|
|
300
300
|
|
|
301
|
+
## Example Usage
|
|
302
|
+
|
|
303
|
+
Let us take a look at an example of how you can manage two teams: Marketing and Data Engineering. In the following scenario we want the marketing team to have a really good query experience, so we enabled delta cache for them. On the other hand we want the data engineering team to be able to utilize bigger clusters so we increased the dbus per hour that they can spend. This strategy allows your marketing users and data engineering users to use Databricks in a self service manner but have a different experience in regards to security and performance. And down the line if you need to add more global settings you can propagate them through the "base cluster policy".
|
|
304
|
+
|
|
305
|
+
`modules/base-cluster-policy/main.tf` could look like:
|
|
306
|
+
|
|
307
|
+
```python
|
|
308
|
+
import pulumi
|
|
309
|
+
import json
|
|
310
|
+
import pulumi_databricks as databricks
|
|
311
|
+
import pulumi_std as std
|
|
312
|
+
|
|
313
|
+
config = pulumi.Config()
|
|
314
|
+
# Team that performs the work
|
|
315
|
+
team = config.require_object("team")
|
|
316
|
+
# Cluster policy overrides
|
|
317
|
+
policy_overrides = config.require_object("policyOverrides")
|
|
318
|
+
default_policy = {
|
|
319
|
+
"dbus_per_hour": {
|
|
320
|
+
"type": "range",
|
|
321
|
+
"maxValue": 10,
|
|
322
|
+
},
|
|
323
|
+
"autotermination_minutes": {
|
|
324
|
+
"type": "fixed",
|
|
325
|
+
"value": 20,
|
|
326
|
+
"hidden": True,
|
|
327
|
+
},
|
|
328
|
+
"custom_tags.Team": {
|
|
329
|
+
"type": "fixed",
|
|
330
|
+
"value": team,
|
|
331
|
+
},
|
|
332
|
+
}
|
|
333
|
+
fair_use = databricks.ClusterPolicy("fair_use",
|
|
334
|
+
name=f"{team} cluster policy",
|
|
335
|
+
definition=json.dumps(std.merge(input=[
|
|
336
|
+
default_policy,
|
|
337
|
+
policy_overrides,
|
|
338
|
+
]).result),
|
|
339
|
+
libraries=[
|
|
340
|
+
{
|
|
341
|
+
"pypi": {
|
|
342
|
+
"package": "databricks-sdk==0.12.0",
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"maven": {
|
|
347
|
+
"coordinates": "com.oracle.database.jdbc:ojdbc8:XXXX",
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
])
|
|
351
|
+
can_use_cluster_policyinstance_profile = databricks.Permissions("can_use_cluster_policyinstance_profile",
|
|
352
|
+
cluster_policy_id=fair_use.id,
|
|
353
|
+
access_controls=[{
|
|
354
|
+
"group_name": team,
|
|
355
|
+
"permission_level": "CAN_USE",
|
|
356
|
+
}])
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
And custom instances of that base policy module for our marketing and data engineering teams would look like:
|
|
360
|
+
|
|
301
361
|
### Overriding the built-in cluster policies
|
|
302
362
|
|
|
303
363
|
You can override built-in cluster policies by creating a `ClusterPolicy` resource with following attributes:
|
|
@@ -405,6 +465,66 @@ class ClusterPolicy(pulumi.CustomResource):
|
|
|
405
465
|
* A user who has both cluster create permission and access to cluster policies can select the Free form policy and policies they have access to.
|
|
406
466
|
* A user that has access to only cluster policies, can select the policies they have access to.
|
|
407
467
|
|
|
468
|
+
## Example Usage
|
|
469
|
+
|
|
470
|
+
Let us take a look at an example of how you can manage two teams: Marketing and Data Engineering. In the following scenario we want the marketing team to have a really good query experience, so we enabled delta cache for them. On the other hand we want the data engineering team to be able to utilize bigger clusters so we increased the dbus per hour that they can spend. This strategy allows your marketing users and data engineering users to use Databricks in a self service manner but have a different experience in regards to security and performance. And down the line if you need to add more global settings you can propagate them through the "base cluster policy".
|
|
471
|
+
|
|
472
|
+
`modules/base-cluster-policy/main.tf` could look like:
|
|
473
|
+
|
|
474
|
+
```python
|
|
475
|
+
import pulumi
|
|
476
|
+
import json
|
|
477
|
+
import pulumi_databricks as databricks
|
|
478
|
+
import pulumi_std as std
|
|
479
|
+
|
|
480
|
+
config = pulumi.Config()
|
|
481
|
+
# Team that performs the work
|
|
482
|
+
team = config.require_object("team")
|
|
483
|
+
# Cluster policy overrides
|
|
484
|
+
policy_overrides = config.require_object("policyOverrides")
|
|
485
|
+
default_policy = {
|
|
486
|
+
"dbus_per_hour": {
|
|
487
|
+
"type": "range",
|
|
488
|
+
"maxValue": 10,
|
|
489
|
+
},
|
|
490
|
+
"autotermination_minutes": {
|
|
491
|
+
"type": "fixed",
|
|
492
|
+
"value": 20,
|
|
493
|
+
"hidden": True,
|
|
494
|
+
},
|
|
495
|
+
"custom_tags.Team": {
|
|
496
|
+
"type": "fixed",
|
|
497
|
+
"value": team,
|
|
498
|
+
},
|
|
499
|
+
}
|
|
500
|
+
fair_use = databricks.ClusterPolicy("fair_use",
|
|
501
|
+
name=f"{team} cluster policy",
|
|
502
|
+
definition=json.dumps(std.merge(input=[
|
|
503
|
+
default_policy,
|
|
504
|
+
policy_overrides,
|
|
505
|
+
]).result),
|
|
506
|
+
libraries=[
|
|
507
|
+
{
|
|
508
|
+
"pypi": {
|
|
509
|
+
"package": "databricks-sdk==0.12.0",
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"maven": {
|
|
514
|
+
"coordinates": "com.oracle.database.jdbc:ojdbc8:XXXX",
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
])
|
|
518
|
+
can_use_cluster_policyinstance_profile = databricks.Permissions("can_use_cluster_policyinstance_profile",
|
|
519
|
+
cluster_policy_id=fair_use.id,
|
|
520
|
+
access_controls=[{
|
|
521
|
+
"group_name": team,
|
|
522
|
+
"permission_level": "CAN_USE",
|
|
523
|
+
}])
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
And custom instances of that base policy module for our marketing and data engineering teams would look like:
|
|
527
|
+
|
|
408
528
|
### Overriding the built-in cluster policies
|
|
409
529
|
|
|
410
530
|
You can override built-in cluster policies by creating a `ClusterPolicy` resource with following attributes:
|
|
@@ -54,6 +54,8 @@ debugHeaders: Optional[bool]
|
|
|
54
54
|
|
|
55
55
|
debugTruncateBytes: Optional[int]
|
|
56
56
|
|
|
57
|
+
experimentalIsUnifiedHost: Optional[bool]
|
|
58
|
+
|
|
57
59
|
googleCredentials: Optional[str]
|
|
58
60
|
|
|
59
61
|
googleServiceAccount: Optional[str]
|
|
@@ -86,3 +88,5 @@ username: Optional[str]
|
|
|
86
88
|
|
|
87
89
|
warehouseId: Optional[str]
|
|
88
90
|
|
|
91
|
+
workspaceId: Optional[str]
|
|
92
|
+
|
pulumi_databricks/config/vars.py
CHANGED
|
@@ -100,6 +100,10 @@ class _ExportableConfig(types.ModuleType):
|
|
|
100
100
|
def debug_truncate_bytes(self) -> Optional[int]:
|
|
101
101
|
return __config__.get_int('debugTruncateBytes')
|
|
102
102
|
|
|
103
|
+
@_builtins.property
|
|
104
|
+
def experimental_is_unified_host(self) -> Optional[bool]:
|
|
105
|
+
return __config__.get_bool('experimentalIsUnifiedHost')
|
|
106
|
+
|
|
103
107
|
@_builtins.property
|
|
104
108
|
def google_credentials(self) -> Optional[str]:
|
|
105
109
|
return __config__.get('googleCredentials')
|
|
@@ -164,3 +168,7 @@ class _ExportableConfig(types.ModuleType):
|
|
|
164
168
|
def warehouse_id(self) -> Optional[str]:
|
|
165
169
|
return __config__.get('warehouseId')
|
|
166
170
|
|
|
171
|
+
@_builtins.property
|
|
172
|
+
def workspace_id(self) -> Optional[str]:
|
|
173
|
+
return __config__.get('workspaceId')
|
|
174
|
+
|