File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ data "azurerm_monitor_diagnostic_categories" "diagnostic_categories_function" {
190190resource "azurerm_monitor_diagnostic_setting" "diagnostic_setting_function" {
191191 name = " logAnalytics"
192192 target_resource_id = azapi_resource. function . id
193- log_analytics_workspace_id = azurerm_log_analytics_workspace . log_analytics_workspace . id
193+ log_analytics_workspace_id = var . log_analytics_workspace_id
194194
195195 dynamic "enabled_log" {
196196 iterator = entry
@@ -224,10 +224,19 @@ resource "azurerm_private_endpoint" "function_private_endpoint" {
224224 subresource_names = [" sites" ]
225225 }
226226 subnet_id = azapi_resource. subnet_private_endpoints . id
227- private_dns_zone_group {
228- name = " ${ azapi_resource . function . name } -arecord"
229- private_dns_zone_ids = [
230- var . private_dns_zone_id_sites
227+ dynamic "private_dns_zone_group" {
228+ for_each = var. private_dns_zone_id_sites == " " ? [] : [1 ]
229+ content {
230+ name = " ${ azapi_resource . function . name } -arecord"
231+ private_dns_zone_ids = [
232+ var . private_dns_zone_id_sites
233+ ]
234+ }
235+ }
236+
237+ lifecycle {
238+ ignore_changes = [
239+ private_dns_zone_group
231240 ]
232241 }
233242}
You can’t perform that action at this time.
0 commit comments