From 7fd0f837ff267b6df57c43842f96d24e3c83e0e5 Mon Sep 17 00:00:00 2001 From: Rhys Bushnell Date: Fri, 28 Jul 2023 15:11:33 +0100 Subject: [PATCH 1/5] update adf module --- azurerm/modules/azurerm-adf/main.tf | 7 +------ azurerm/modules/azurerm-adf/vars.tf | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/azurerm/modules/azurerm-adf/main.tf b/azurerm/modules/azurerm-adf/main.tf index 54429846..69644074 100644 --- a/azurerm/modules/azurerm-adf/main.tf +++ b/azurerm/modules/azurerm-adf/main.tf @@ -1,8 +1,3 @@ -data "azurerm_client_config" "current" { -} - - - resource "azurerm_data_factory" "example" { count = var.create_adf ? 1 : 0 name = var.resource_namer @@ -45,7 +40,7 @@ resource "azurerm_data_factory" "example" { project_name = var.vsts_project_name repository_name = var.repository_name root_folder = var.root_folder - tenant_id = data.azurerm_client_config.current.tenant_id + tenant_id = var.tenant_id } } diff --git a/azurerm/modules/azurerm-adf/vars.tf b/azurerm/modules/azurerm-adf/vars.tf index 0343ec55..252307a5 100644 --- a/azurerm/modules/azurerm-adf/vars.tf +++ b/azurerm/modules/azurerm-adf/vars.tf @@ -19,6 +19,12 @@ variable "name_component" { type = string } +variable "tenant_id" { + type = string + default = "" + description = "Azure Tenant ID." +} + ############################################ # RESOURCE INFORMATION ############################################ From 0020097d4972fd0c299a41c5b5de9b8ced0d88e8 Mon Sep 17 00:00:00 2001 From: Rhys Bushnell Date: Fri, 28 Jul 2023 15:15:23 +0100 Subject: [PATCH 2/5] update --- azurerm/modules/azurerm-adls/data.tf | 11 ----------- azurerm/modules/azurerm-adls/main.tf | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 azurerm/modules/azurerm-adls/data.tf diff --git a/azurerm/modules/azurerm-adls/data.tf b/azurerm/modules/azurerm-adls/data.tf deleted file mode 100644 index 3c7d980c..00000000 --- a/azurerm/modules/azurerm-adls/data.tf +++ /dev/null @@ -1,11 +0,0 @@ -data "azurerm_private_dns_zone" "blob_pvt_dns" { - count = var.enable_private_network ? 1 : 0 - name = var.blob_private_dns_zone_name - resource_group_name = var.blob_dns_resource_group_name -} - -data "azurerm_private_dns_zone" "dfs_pvt_dns" { - count = var.enable_private_network ? 1 : 0 - name = var.dfs_private_dns_zone_name - resource_group_name = var.dfs_dns_resource_group_name -} diff --git a/azurerm/modules/azurerm-adls/main.tf b/azurerm/modules/azurerm-adls/main.tf index 986d1d50..0b56c46c 100644 --- a/azurerm/modules/azurerm-adls/main.tf +++ b/azurerm/modules/azurerm-adls/main.tf @@ -91,7 +91,7 @@ resource "azurerm_private_endpoint" "pe_dfs" { private_dns_zone_group { name = azurerm_storage_account.storage_account_default[each.key].name - private_dns_zone_ids = [data.azurerm_private_dns_zone.dfs_pvt_dns[0].id] + private_dns_zone_ids = [var.var.dfs_private_zone_id] } } @@ -114,6 +114,6 @@ resource "azurerm_private_endpoint" "pe_blob" { private_dns_zone_group { name = azurerm_storage_account.storage_account_default[each.key].name - private_dns_zone_ids = [data.azurerm_private_dns_zone.blob_pvt_dns[0].id] + private_dns_zone_ids = [var.var.blob_private_zone_id] } } From 8c39695470a831c6b273f17214da598908f1cbab Mon Sep 17 00:00:00 2001 From: Rhys Bushnell Date: Fri, 28 Jul 2023 15:20:29 +0100 Subject: [PATCH 3/5] add vars --- azurerm/modules/azurerm-adls/vars.tf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azurerm/modules/azurerm-adls/vars.tf b/azurerm/modules/azurerm-adls/vars.tf index 4a73dbc0..b3fc5f85 100644 --- a/azurerm/modules/azurerm-adls/vars.tf +++ b/azurerm/modules/azurerm-adls/vars.tf @@ -175,4 +175,16 @@ variable "la_workspace_id" { type = string default = "" description = "Log Analytics Workspace ID" +} + +variable "dfs_private_zone_id" { + type = string + default = "" + description = "Resource ID of the DFS Private DNS Zone" +} + +variable "blob_private_zone_id" { + type = string + default = "" + description = "Resource ID of the Blob Private DNS Zone" } \ No newline at end of file From a84e7d46a65bbd085111db6a90ffb76141353f06 Mon Sep 17 00:00:00 2001 From: Rhys Bushnell Date: Fri, 28 Jul 2023 15:21:46 +0100 Subject: [PATCH 4/5] fix typo --- azurerm/modules/azurerm-adls/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/modules/azurerm-adls/main.tf b/azurerm/modules/azurerm-adls/main.tf index 0b56c46c..fc9dc420 100644 --- a/azurerm/modules/azurerm-adls/main.tf +++ b/azurerm/modules/azurerm-adls/main.tf @@ -114,6 +114,6 @@ resource "azurerm_private_endpoint" "pe_blob" { private_dns_zone_group { name = azurerm_storage_account.storage_account_default[each.key].name - private_dns_zone_ids = [var.var.blob_private_zone_id] + private_dns_zone_ids = [var.blob_private_zone_id] } } From 3528da8b22b14a375129c361f0abb8db62df6caf Mon Sep 17 00:00:00 2001 From: Rhys Bushnell Date: Fri, 28 Jul 2023 15:25:07 +0100 Subject: [PATCH 5/5] fix another typo --- azurerm/modules/azurerm-adls/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/modules/azurerm-adls/main.tf b/azurerm/modules/azurerm-adls/main.tf index fc9dc420..3f63788a 100644 --- a/azurerm/modules/azurerm-adls/main.tf +++ b/azurerm/modules/azurerm-adls/main.tf @@ -91,7 +91,7 @@ resource "azurerm_private_endpoint" "pe_dfs" { private_dns_zone_group { name = azurerm_storage_account.storage_account_default[each.key].name - private_dns_zone_ids = [var.var.dfs_private_zone_id] + private_dns_zone_ids = [var.dfs_private_zone_id] } }