diff --git a/terraform/data-factory/data-factory/main.tf b/terraform/data-factory/data-factory/main.tf index 5061c3cc..3214c26b 100644 --- a/terraform/data-factory/data-factory/main.tf +++ b/terraform/data-factory/data-factory/main.tf @@ -31,6 +31,8 @@ module "df_pe" { private_dns_zone_ids = var.private_dns_zone_ids_df tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint + + count = var.module_enabled ? 1 : 0 } module "portal_pe" { @@ -45,4 +47,6 @@ module "portal_pe" { private_dns_zone_ids = var.private_dns_zone_ids_portal tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint + + count = var.module_enabled ? 1 : 0 } \ No newline at end of file diff --git a/terraform/event-hubs/event-hubs-namespace/main.tf b/terraform/event-hubs/event-hubs-namespace/main.tf index 55551106..8f96f0d7 100644 --- a/terraform/event-hubs/event-hubs-namespace/main.tf +++ b/terraform/event-hubs/event-hubs-namespace/main.tf @@ -32,4 +32,6 @@ module "evhns_pe" { private_dns_zone_ids = var.private_dns_zone_ids tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint + + count = var.module_enabled ? 1 : 0 } \ No newline at end of file diff --git a/terraform/storage-account/main.tf b/terraform/storage-account/main.tf index 053ac4de..39a65341 100644 --- a/terraform/storage-account/main.tf +++ b/terraform/storage-account/main.tf @@ -79,6 +79,8 @@ module "st_pe_blob" { private_dns_zone_ids = var.private_dns_zone_ids_blob tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint && length(var.private_dns_zone_ids_blob) != 0 + + count = var.module_enabled ? 1 : 0 } module "st_pe_file" { @@ -93,6 +95,8 @@ module "st_pe_file" { private_dns_zone_ids = var.private_dns_zone_ids_file tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint && length(var.private_dns_zone_ids_file) != 0 + + count = var.module_enabled ? 1 : 0 } module "st_pe_dfs" { @@ -107,4 +111,6 @@ module "st_pe_dfs" { private_dns_zone_ids = var.private_dns_zone_ids_dfs tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint && length(var.private_dns_zone_ids_dfs) != 0 + + count = var.module_enabled ? 1 : 0 } \ No newline at end of file diff --git a/terraform/synapse/synapse-private-link-hub/main.tf b/terraform/synapse/synapse-private-link-hub/main.tf index 9914c922..2214a7aa 100644 --- a/terraform/synapse/synapse-private-link-hub/main.tf +++ b/terraform/synapse/synapse-private-link-hub/main.tf @@ -23,4 +23,6 @@ module "synplh_pe_web" { private_dns_zone_ids = var.private_dns_zone_ids tags = var.tags module_enabled = var.module_enabled + + count = var.module_enabled ? 1 : 0 } \ No newline at end of file diff --git a/terraform/synapse/synapse-workspace/main.tf b/terraform/synapse/synapse-workspace/main.tf index 52b96d8a..864f0c05 100644 --- a/terraform/synapse/synapse-workspace/main.tf +++ b/terraform/synapse/synapse-workspace/main.tf @@ -70,6 +70,8 @@ module "syn_ws_pe_dev" { private_dns_zone_ids = var.private_dns_zone_ids_dev tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint + + count = var.module_enabled ? 1 : 0 } module "syn_ws_pe_sql" { @@ -84,6 +86,8 @@ module "syn_ws_pe_sql" { private_dns_zone_ids = var.private_dns_zone_ids_sql tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint + + count = var.module_enabled ? 1 : 0 } module "syn_ws_pe_sqlondemand" { @@ -98,6 +102,8 @@ module "syn_ws_pe_sqlondemand" { private_dns_zone_ids = var.private_dns_zone_ids_sql tags = var.tags module_enabled = var.module_enabled && var.is_private_endpoint + + count = var.module_enabled ? 1 : 0 } resource "azurerm_synapse_role_assignment" "syn_ws_role_default_user" {