Skip to content

Commit 3b518f1

Browse files
authored
Merge pull request #10 from tomarv2/develop
Pulling refs/heads/develop into main
2 parents e71a2cc + 6870413 commit 3b518f1

File tree

9 files changed

+32
-23
lines changed

9 files changed

+32
-23
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ repos:
1212
- '--args=--only=terraform_documented_outputs'
1313
- '--args=--only=terraform_documented_variables'
1414
- '--args=--only=terraform_typed_variables'
15-
#- '--args=--only=terraform_module_pinned_source'
1615
- '--args=--only=terraform_naming_convention'
1716
- '--args=--only=terraform_required_providers'
1817
- '--args=--only=terraform_standard_module_structure'

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ tf -c=azure destroy -var='teamid=foo' -var='prjid=bar'
9696
module "databricks_workspace" {
9797
source = "git::[email protected]:tomarv2/terraform-databricks-azure-workspace.git"
9898
99-
resource_group_name = "demo-rg"
99+
resource_group_settings = [
100+
{
101+
name = "demo1"
102+
location = "westus2"
103+
}]
100104
# ---------------------------------------------
101105
# Note: Do not change teamid and prjid once set.
102106
teamid = var.teamid
@@ -134,7 +138,7 @@ Please refer to examples directory [link](examples) for references.
134138

135139
| Name | Source | Version |
136140
|------|--------|---------|
137-
| <a name="module_resource_group"></a> [resource\_group](#module\_resource\_group) | git::[email protected]:tomarv2/terraform-azure-resource-group.git | v0.0.10 |
141+
| <a name="module_resource_group"></a> [resource\_group](#module\_resource\_group) | git::[email protected]:tomarv2/terraform-azure-resource-group.git | v0.0.12 |
138142

139143
## Resources
140144

@@ -159,13 +163,13 @@ Please refer to examples directory [link](examples) for references.
159163
| <a name="input_load_balancer_backend_address_pool_id"></a> [load\_balancer\_backend\_address\_pool\_id](#input\_load\_balancer\_backend\_address\_pool\_id) | Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace. Changing this forces a new resource to be created | `string` | `null` | no |
160164
| <a name="input_managed_services_cmk_key_vault_key_id"></a> [managed\_services\_cmk\_key\_vault\_key\_id](#input\_managed\_services\_cmk\_key\_vault\_key\_id) | Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts). Changing this forces a new resource to be created. | `string` | `null` | no |
161165
| <a name="input_network_security_group_rules_required"></a> [network\_security\_group\_rules\_required](#input\_network\_security\_group\_rules\_required) | Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values AllRules, NoAzureDatabricksRules or NoAzureServiceRules. Required when public\_network\_access\_enabled is set to false. Changing this forces a new resource to be created | `string` | `null` | no |
162-
| <a name="input_prjid"></a> [prjid](#input\_prjid) | (Required) Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply' | `string` | n/a | yes |
166+
| <a name="input_prjid"></a> [prjid](#input\_prjid) | Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply' | `string` | n/a | yes |
163167
| <a name="input_public_network_access_enabled"></a> [public\_network\_access\_enabled](#input\_public\_network\_access\_enabled) | Allow public access for accessing workspace. Set value to false to access workspace only via private link endpoint. Possible values include true or false. Defaults to true. Changing this forces a new resource to be created | `bool` | `true` | no |
164168
| <a name="input_region"></a> [region](#input\_region) | The region where the resources are created | `string` | `"westus2"` | no |
165169
| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | Resource Group name | `string` | `null` | no |
166-
| <a name="input_resource_group_settings"></a> [resource\_group\_settings](#input\_resource\_group\_settings) | n/a | `any` | n/a | yes |
170+
| <a name="input_resource_group_settings"></a> [resource\_group\_settings](#input\_resource\_group\_settings) | Resource Group name | `map(any)` | `null` | no |
167171
| <a name="input_sku"></a> [sku](#input\_sku) | 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 | `string` | `"standard"` | no |
168-
| <a name="input_teamid"></a> [teamid](#input\_teamid) | (Required) Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply' | `string` | n/a | yes |
172+
| <a name="input_teamid"></a> [teamid](#input\_teamid) | Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply' | `string` | n/a | yes |
169173
| <a name="input_workspace_name"></a> [workspace\_name](#input\_workspace\_name) | Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created | `string` | `null` | no |
170174

171175
## Outputs

examples/azure_databricks/main.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
module "azure_databricks" {
22
source = "../../"
33

4-
resource_group_settings = [
5-
{
6-
name = "demo1"
7-
location = "westus2"
8-
}]
4+
resource_group_name = "demo"
95
# ---------------------------------------------
106
# Note: Do not change teamid and prjid once set.
117
teamid = var.teamid
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
variable "teamid" {
2-
description = "(Required) Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
2+
description = "Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
33
type = string
44
default = "demo"
55
}
66

77
variable "prjid" {
8-
description = "(Required) Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
8+
description = "Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
99
type = string
1010
default = "databricks"
1111
}

examples/azure_databricks_with_virtual_network/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ module "vnet" {
1313
module "azure_databricks" {
1414
source = "../../"
1515

16-
resource_group_name = "demo-resource_group"
1716
custom_parameters = {
1817
virtual_network_id = module.vnet.virtual_network_id
1918
}
19+
resource_group_settings = [
20+
{
21+
name = "demo1"
22+
location = "westus2"
23+
}]
2024
# ---------------------------------------------
2125
# Note: Do not change teamid and prjid once set.
2226
teamid = var.teamid
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
variable "teamid" {
2-
description = "(Required) Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
2+
description = "Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
33
type = string
44
default = "demo"
55
}
66

77
variable "prjid" {
8-
description = "(Required) Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
8+
description = "Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
99
type = string
1010
default = "databricks"
1111
}

main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ data "databricks_current_user" "me" {
1212
*/
1313

1414
module "resource_group" {
15-
source = "git::[email protected]:tomarv2/terraform-azure-resource-group.git?ref=v0.0.10"
15+
source = "git::[email protected]:tomarv2/terraform-azure-resource-group.git?ref=v0.0.12"
16+
17+
resource_group_settings = var.resource_group_settings != null ? var.resource_group_settings : []
1618

17-
resource_group_settings = var.resource_group_settings
1819
teamid = var.teamid
1920
prjid = var.prjid
2021
}
21-
22-
variable "resource_group_settings" {}

variables.tf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
variable "teamid" {
2-
description = "(Required) Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
2+
description = "Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply'"
33
type = string
44
}
55

66
variable "prjid" {
7-
description = "(Required) Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
7+
description = "Name of the project/stack e.g: mystack, nifieks, demoaci. Should not be changed after running 'tf apply'"
88
type = string
99
}
1010

@@ -30,6 +30,13 @@ variable "resource_group_name" {
3030
type = string
3131
}
3232

33+
34+
variable "resource_group_settings" {
35+
description = "Resource Group name"
36+
default = null
37+
type = map(any)
38+
}
39+
3340
variable "workspace_name" {
3441
description = "Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created"
3542
default = null

workspace.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "azurerm_databricks_workspace" "this" {
22
name = var.workspace_name != null ? var.workspace_name : "${var.teamid}-${var.prjid}"
3-
resource_group_name = module.resource_group.resource_group_name[0]
3+
resource_group_name = var.resource_group_name != null ? var.resource_group_name : module.resource_group.resource_group_name[0]
44
location = var.region
55
sku = var.sku
66
managed_resource_group_name = "${local.prefix}-workspace-rg"

0 commit comments

Comments
 (0)