Skip to content

Commit ab2fb03

Browse files
committed
initial commit
1 parent a7724f2 commit ab2fb03

File tree

11 files changed

+69
-22
lines changed

11 files changed

+69
-22
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 56b022b7b43f70fc2769de0b596c644e016abc16
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 51c05d219bfa7e6b23cc7c9c5a47e745e3846b4a

.pre-commit-config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ repos:
2424
- id: end-of-file-fixer
2525
- id: check-yaml
2626

27+
# - repo: https://github.com/bridgecrewio/checkov.git
28+
# rev: '2.0.769'
29+
# hooks:
30+
# - id: checkov
31+
# verbose: true
32+
# args:
33+
# - -d . --framework terraform -o output_format json --download-external-modules True
34+
2735
- repo: https://github.com/bridgecrewio/checkov.git
2836
rev: '2.0.769'
2937
hooks:
3038
- id: checkov
3139
verbose: true
32-
args:
33-
- -d . --framework terraform -o output_format json
40+
args: [-d, '.', --framework, 'terraform', --download-external-modules, 'True']

README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,10 @@
1616
</p>
1717

1818
## Terraform module for [Databricks Azure Workspace (Part 1)](https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs/guides/azure-workspace)
19+
---
1920

20-
> ❗️ **Important**
21-
>
22-
> :point_right: This Terraform module assumes you have access to: [https://accounts.cloud.databricks.com](https://accounts.cloud.databricks.com)
23-
>
24-
> :point_right: Databricks account username: `databricks_account_username`
25-
>
26-
> :point_right: Databricks account password: `databricks_account_password`
27-
>
28-
> :point_right: Databricks account id, `databricks_account_id` can be found on the top right corner of the page, once you're logged in.
29-
>
30-
> :point_right: Part 2: Terraform module for [Databricks Workspace management](https://github.com/tomarv2/terraform-databricks-workspace-management)
21+
## Terraform module for [Databricks AWS Workspace](https://github.com/tomarv2/terraform-databricks-aws-workspace)
3122

32-
---
3323
![Databricks deployment](https://github.com/tomarv2/terraform-databricks-azure-workspace/raw/main/docs/images/databricks_deployment.png)
3424
---
3525

@@ -76,7 +66,7 @@ export TF_AZURE_CONTAINER=tfstate # Output of remote_state.sh
7666
export ARM_ACCESS_KEY=xxxxxxxxxx # Output of remote_state.sh
7767
```
7868

79-
- Update [main.tf](examples/azure_databricks_new_vnet/main.tf) file with required values.
69+
- Update [main.tf](examples/azure_databricks_with_virtual_network/main.tf) file with required values.
8070

8171
- Run and verify the output before deploying:
8272
```

examples/azure_databricks/main.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module "azure_databricks" {
2+
source = "../../"
3+
4+
deploy_resource_group = false
5+
resource_group_name = "demo-resource_group"
6+
# ---------------------------------------------
7+
# Note: Do not change teamid and prjid once set.
8+
teamid = var.teamid
9+
prjid = var.prjid
10+
}

examples/azure_databricks_new_vnet/outputs.tf renamed to examples/azure_databricks/outputs.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ output "databricks_managed_resource_group_name" {
1919
}
2020

2121
output "databricks_sku" {
22-
value = module.azure_databricks.databricks_sku
23-
}
22+
description = "The sku to use for the Databricks Workspace. Possible values are standard, premium, or trial. Changing this can force a new resource to be created in some circumstances"
23+
value = module.azure_databricks.databricks_sku
24+
}
File renamed without changes.

examples/azure_databricks_new_vnet/main.tf renamed to examples/azure_databricks_with_virtual_network/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "vnet" {
2-
source = "[email protected]:tomarv2/terraform-azure-vnet.git?ref=v0.0.1"
2+
source = "[email protected]:tomarv2/terraform-azure-virtual-network.git?ref=v0.0.2"
33

44
resource_group_name = "demo-resource_group"
55
location = "westus2"
@@ -11,11 +11,12 @@ module "vnet" {
1111
}
1212

1313
module "azure_databricks" {
14-
source = "../../"
14+
source = "../../"
15+
1516
deploy_resource_group = false
1617
resource_group_name = "demo-resource_group"
1718
custom_parameters = {
18-
virtual_network_id = module.vnet.vnet_id
19+
virtual_network_id = module.vnet.virtual_network_id
1920
}
2021
# ---------------------------------------------
2122
# Note: Do not change teamid and prjid once set.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
output "resource_group_name" {
2+
description = "Resource Group name"
3+
value = module.azure_databricks.resource_group_name
4+
}
5+
6+
output "databricks_host" {
7+
description = "Databricks hosts"
8+
value = module.azure_databricks.databricks_host
9+
}
10+
11+
output "databricks_workspace_id" {
12+
description = "Databricks workspace id"
13+
value = module.azure_databricks.databricks_workspace_id
14+
}
15+
16+
output "databricks_managed_resource_group_name" {
17+
description = "Databricks managed_resource group name"
18+
value = module.azure_databricks.managed_resource_group_name
19+
}
20+
21+
output "databricks_sku" {
22+
description = "The sku to use for the Databricks Workspace. Possible values are standard, premium, or trial. Changing this can force a new resource to be created in some circumstances"
23+
value = module.azure_databricks.databricks_sku
24+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
variable "teamid" {
2+
description = "(Required) Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
3+
type = string
4+
default = "demo"
5+
}
6+
7+
variable "prjid" {
8+
description = "(Required) Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
9+
type = string
10+
default = "databricks"
11+
}

0 commit comments

Comments
 (0)