Skip to content

Commit e71a2cc

Browse files
authored
Merge pull request #9 from tomarv2/develop
Pulling refs/heads/develop into main
2 parents 80fc37f + 270d2bc commit e71a2cc

File tree

8 files changed

+43
-51
lines changed

8 files changed

+43
-51
lines changed

.github/workflows/pr-lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR lint
2+
3+
on:
4+
pull_request:
5+
types: ['opened', 'edited', 'reopened', 'synchronize']
6+
7+
jobs:
8+
pr-lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: seferov/pr-lint-action@master
12+
with:
13+
title-regex: '^((Pulling|Update from) refs\/heads\/|(\[tf (plan|apply|destroy|status)\]|\[non tf\])\s(feat|fix|build|chore|ci|docs|style|refactor|perf|test)(\!?): (.{3,250})[^\s*]$)'
14+
github-token: ${{ secrets.GITHUB_TOKEN }}
15+
auto-close-message: 'Closing this pull request since the title does not match %pattern% pattern. Please fix the title and re-open the pull request.'

.github/workflows/stale-actions.yml

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

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,36 +116,34 @@ Please refer to examples directory [link](examples) for references.
116116
| Name | Version |
117117
|------|---------|
118118
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.1 |
119-
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 2.94 |
120-
| <a name="requirement_databricks"></a> [databricks](#requirement\_databricks) | 0.3.5 |
119+
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.21.1 |
120+
| <a name="requirement_databricks"></a> [databricks](#requirement\_databricks) | 1.2.1 |
121121
| <a name="requirement_external"></a> [external](#requirement\_external) | ~> 2.2 |
122122
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.1 |
123123

124124
## Providers
125125

126126
| Name | Version |
127127
|------|---------|
128-
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | ~> 2.94 |
129-
| <a name="provider_databricks"></a> [databricks](#provider\_databricks) | 0.3.5 |
130-
| <a name="provider_databricks.created_workspace"></a> [databricks.created\_workspace](#provider\_databricks.created\_workspace) | 0.3.5 |
128+
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | ~> 3.21.1 |
129+
| <a name="provider_databricks.created_workspace"></a> [databricks.created\_workspace](#provider\_databricks.created\_workspace) | 1.2.1 |
131130
| <a name="provider_external"></a> [external](#provider\_external) | ~> 2.2 |
132131
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.1 |
133132

134133
## Modules
135134

136135
| Name | Source | Version |
137136
|------|--------|---------|
138-
| <a name="module_resource_group"></a> [resource\_group](#module\_resource\_group) | git::[email protected]:tomarv2/terraform-azure-resource-group.git | v0.0.3 |
137+
| <a name="module_resource_group"></a> [resource\_group](#module\_resource\_group) | git::[email protected]:tomarv2/terraform-azure-resource-group.git | v0.0.10 |
139138

140139
## Resources
141140

142141
| Name | Type |
143142
|------|------|
144143
| [azurerm_databricks_workspace.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace) | resource |
145-
| [databricks_token.pat](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/resources/token) | resource |
144+
| [databricks_token.pat](https://registry.terraform.io/providers/databricks/databricks/1.2.1/docs/resources/token) | resource |
146145
| [random_string.naming](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
147146
| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/client_config) | data source |
148-
| [databricks_current_user.me](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/data-sources/current_user) | data source |
149147
| [external_external.current_user](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/external) | data source |
150148

151149
## Inputs
@@ -165,6 +163,7 @@ Please refer to examples directory [link](examples) for references.
165163
| <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 |
166164
| <a name="input_region"></a> [region](#input\_region) | The region where the resources are created | `string` | `"westus2"` | no |
167165
| <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 |
168167
| <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 |
169168
| <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 |
170169
| <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 |

examples/azure_databricks/main.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
module "azure_databricks" {
22
source = "../../"
33

4-
resource_group_name = "demo-resource_group"
4+
resource_group_settings = [
5+
{
6+
name = "demo1"
7+
location = "westus2"
8+
}]
59
# ---------------------------------------------
610
# Note: Do not change teamid and prjid once set.
711
teamid = var.teamid
812
prjid = var.prjid
913
}
14+
15+
provider "azurerm" {
16+
features {}
17+
}

main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ data "external" "current_user" {
55
program = ["az", "account", "show", "--query", "user"]
66
}
77

8+
/*
89
data "databricks_current_user" "me" {
910
depends_on = [azurerm_databricks_workspace.this]
1011
}
12+
*/
1113

1214
module "resource_group" {
13-
source = "git::[email protected]:tomarv2/terraform-azure-resource-group.git?ref=v0.0.3"
15+
source = "git::[email protected]:tomarv2/terraform-azure-resource-group.git?ref=v0.0.10"
1416

15-
deploy_resource_group = var.deploy_resource_group != false ? true : false
16-
resource_group_name = var.resource_group_name != null ? var.resource_group_name : "${var.teamid}-${var.prjid}"
17-
18-
# ------------------------------------------------
19-
# Do not change the teamid, prjid once set.
17+
resource_group_settings = var.resource_group_settings
2018
teamid = var.teamid
2119
prjid = var.prjid
2220
}
21+
22+
variable "resource_group_settings" {}

pat_token.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ resource "databricks_token" "pat" {
33

44
comment = "Terraform managed: ${var.teamid}-${var.prjid}"
55
lifetime_seconds = var.databricks_token_lifetime_seconds
6+
7+
depends_on = [azurerm_databricks_workspace.this]
68
}
79

810
provider "databricks" {

providers.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ terraform {
22
required_version = ">= 1.0.1"
33
required_providers {
44
azurerm = {
5-
version = "~> 2.94"
5+
version = "~> 3.21.1"
66
}
77
databricks = {
8-
source = "databrickslabs/databricks"
9-
version = "0.3.5"
8+
source = "databricks/databricks"
9+
version = "1.2.1"
1010
}
1111
random = {
1212
version = "~> 3.1"

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 = var.deploy_resource_group != false ? join("", module.resource_group.*.resource_group_name) : var.resource_group_name
3+
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)