File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed
Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11resource "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}
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments