Skip to content

Commit f3274f6

Browse files
authored
Merge pull request #62 from tomarv2/develop
adding file for azure and example
2 parents 218623a + 4832603 commit f3274f6

File tree

21 files changed

+185
-162
lines changed

21 files changed

+185
-162
lines changed

examples/all/sample-maximum_config/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ terraform {
1616
module "databricks_workspace_management" {
1717
source = "../../../"
1818

19-
workspace_url = "https://<workspace_url>.cloud.databricks.com"
20-
dapi_token = "dapi1234567890"
2119
# ------------------------------------------------
2220
# CLUSTER
2321
# ------------------------------------------------

examples/all/sample/main.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ terraform {
1616
module "databricks_workspace_management" {
1717
source = "../../../"
1818

19-
workspace_url = "https://<workspace_url>.cloud.databricks.com"
20-
dapi_token = "dapi1234567890"
21-
# ------------------------------------------------
2219
deploy_cluster = true
2320
deploy_jobs = true
2421
local_notebooks = [

examples/jobs/1_job_on_new_cluster_with_new_and_existing_notebooks/main.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ terraform {
1515

1616
module "databricks_workspace_management" {
1717
source = "../../../"
18-
19-
workspace_url = var.workspace_url
20-
dapi_token = var.dapi_token
2118
# ------------------------------------------------
2219
# JOB
2320
# ------------------------------------------------

examples/jobs/1_job_on_new_cluster_with_new_and_existing_notebooks/outputs.tf

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,17 @@ output "notebook_url" {
77
description = "databricks notebook url"
88
value = module.databricks_workspace_management.notebook_url
99
}
10-
output "new_cluster_new_job_new_notebooks_job" {
10+
output "job_url" {
1111
description = "databricks job url"
1212
value = module.databricks_workspace_management.new_cluster_new_job_new_notebooks_job
1313
}
1414

15-
output "new_cluster_new_job_new_notebooks_id" {
15+
output "job_id" {
1616
description = "databricks job id"
1717
value = module.databricks_workspace_management.new_cluster_new_job_new_notebooks_id
1818
}
1919

20-
output "existing_cluster_new_job_new_notebooks_job" {
21-
description = "databricks new cluster job url"
22-
value = module.databricks_workspace_management.existing_cluster_new_job_new_notebooks_job
23-
}
24-
25-
output "existing_cluster_new_job_new_notebooks_id" {
26-
description = "databricks new cluster job id"
27-
value = module.databricks_workspace_management.existing_cluster_new_job_new_notebooks_id
28-
}
29-
30-
output "new_cluster_new_job_existing_notebooks_job" {
31-
description = "databricks job url"
32-
value = module.databricks_workspace_management.new_cluster_new_job_existing_notebooks_job
33-
}
34-
35-
output "new_cluster_new_job_existing_notebooks_id" {
36-
description = "databricks job id"
20+
output "notebooks_id" {
21+
description = "databricks notebook id"
3722
value = module.databricks_workspace_management.new_cluster_new_job_existing_notebooks_id
3823
}
39-
40-
output "existing_cluster_new_job_existing_notebooks_job" {
41-
description = "databricks new cluster job url"
42-
value = module.databricks_workspace_management.existing_cluster_new_job_existing_notebooks_job
43-
}
44-
45-
output "existing_cluster_new_job_existing_notebooks_id" {
46-
description = "databricks new cluster job id"
47-
value = module.databricks_workspace_management.existing_cluster_new_job_existing_notebooks_id
48-
}

examples/jobs/2_job_on_existing_cluster_with_new_notebooks/outputs.tf

Lines changed: 0 additions & 44 deletions
This file was deleted.

examples/jobs/2_job_on_existing_cluster_with_new_notebooks/main.tf renamed to examples/jobs/2_job_on_new_cluster_with_new_and_existing_notebooks_without_acl/main.tf

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ terraform {
1515

1616
module "databricks_workspace_management" {
1717
source = "../../../"
18-
19-
workspace_url = var.workspace_url
20-
dapi_token = var.dapi_token
2118
# ------------------------------------------------
2219
# JOB
2320
# ------------------------------------------------
2421
deploy_jobs = true
25-
cluster_id = "0907-052446-bike152"
22+
deploy_cluster = true
2623
fixed_value = 1
2724
retry_on_timeout = false
2825
max_retries = 3
@@ -45,15 +42,6 @@ module "databricks_workspace_management" {
4542
on_success = ["demo@demo.com"]
4643
}
4744
# ------------------------------------------------
48-
# JOB ACCESS CONTROL
49-
# ------------------------------------------------
50-
jobs_access_control = [
51-
{
52-
group_name = "demo"
53-
permission_level = "CAN_MANAGE_RUN"
54-
}
55-
]
56-
# ------------------------------------------------
5745
# NOTEBOOK
5846
# ------------------------------------------------
5947
local_notebooks = [
@@ -68,15 +56,12 @@ module "databricks_workspace_management" {
6856
local_path = "notebooks/sample2.py"
6957
}
7058
]
71-
# ------------------------------------------------
72-
# NOTEBOOK ACCESS CONTROL
73-
# ------------------------------------------------
74-
notebooks_access_control = [
75-
{
76-
group_name = "demo"
77-
permission_level = "CAN_READ"
78-
}
79-
]
59+
# remote_notebooks = [
60+
# {
61+
# job_name = "remote_demo_job"
62+
# path = "/Shared/demo/sample1.py"
63+
# }
64+
# ]
8065
# ------------------------------------------------
8166
# Do not change the teamid, prjid once set.
8267
teamid = var.teamid
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
token = dbutils.secrets.get('${databricks_secret_scope.this.name}', '${databricks_secret.token.key}')
2+
print(f'This should be redacted: {token}')
3+
print(f'Hello world - today is holiday')
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
token = dbutils.secrets.get('${databricks_secret_scope.this.name}', '${databricks_secret.token.key}')
2+
print(f'This should be recacted: {token}')
3+
print(f'Hello world')
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
output "cluster_id" {
2+
description = "databricks cluster id"
3+
value = module.databricks_workspace_management.cluster_id
4+
}
5+
6+
output "notebook_url" {
7+
description = "databricks notebook url"
8+
value = module.databricks_workspace_management.notebook_url
9+
}
10+
output "job_url" {
11+
description = "databricks job url"
12+
value = module.databricks_workspace_management.new_cluster_new_job_new_notebooks_job
13+
}
14+
15+
output "job_id" {
16+
description = "databricks job id"
17+
value = module.databricks_workspace_management.new_cluster_new_job_new_notebooks_id
18+
}
19+
20+
output "notebooks_id" {
21+
description = "databricks notebook id"
22+
value = module.databricks_workspace_management.new_cluster_new_job_existing_notebooks_id
23+
}

0 commit comments

Comments
 (0)