Skip to content

Commit c4bd78a

Browse files
committed
white space
1 parent 7cec952 commit c4bd78a

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module "databricks_workspace" {
107107
subscription_id = var.subscription_id
108108
tenant_id = var.tenant_id
109109
110-
rg_name = "demo-rg"
110+
resource_group_name = "demo-rg"
111111
# ---------------------------------------------
112112
# Note: Do not change teamid and prjid once set.
113113
teamid = var.teamid

resource_group.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resource "azurerm_resource_group" "this" {
2-
count = var.deploy_rg != null
2+
count = var.deploy_resource_group != null
33

4-
name = var.rg_name != null ? var.rg_name : "${var.teamid}-${var.prjid}"
4+
name = var.resource_group_name != null ? var.resource_group_name : "${var.teamid}-${var.prjid}"
55
location = var.region
66
tags = var.custom_tags != null ? merge(var.custom_tags, local.shared_tags) : merge(local.shared_tags)
77
}

variables.tf

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ locals {
3838
suffix = random_string.naming.result
3939
}
4040

41-
variable "rg_name" {
41+
variable "resource_group_name" {
4242
description = "Resource Group name"
4343
default = null
4444
type = string
@@ -83,8 +83,18 @@ variable "custom_tags" {
8383
default = null
8484
}
8585

86-
variable "deploy_rg" {
87-
description = "deploy resource group"
86+
variable "deploy_resource_group" {
87+
description = "feature flag to deploy this resource or not"
8888
type = bool
8989
default = false
9090
}
91+
92+
resource "random_string" "naming" {
93+
special = false
94+
upper = false
95+
length = 3
96+
}
97+
98+
locals {
99+
prefix = random_string.naming.result
100+
}

workspace.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ resource "azurerm_databricks_workspace" "this" {
44
location = azurerm_resource_group.this.location
55
sku = var.sku
66
managed_resource_group_name = "${local.prefix}-workspace-rg"
7-
tags = local.tags
7+
tags = local.shared_tags
88
}

0 commit comments

Comments
 (0)