File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ resource "azurerm_application_insights" "this" {
9
9
}
10
10
11
11
data "azurerm_monitor_diagnostic_categories" "this" {
12
+ count = var. enable_diagnostic_setting ? 1 : 0
12
13
resource_id = azurerm_linux_web_app. this . id
13
14
}
14
15
@@ -20,14 +21,14 @@ resource "azurerm_monitor_diagnostic_setting" "this" {
20
21
log_analytics_destination_type = var. analytics_destination_type
21
22
22
23
dynamic "enabled_log" {
23
- for_each = data. azurerm_monitor_diagnostic_categories . this . log_category_types
24
+ for_each = data. azurerm_monitor_diagnostic_categories . this [ 0 ] . log_category_types
24
25
content {
25
26
category = enabled_log. value
26
27
}
27
28
}
28
29
29
30
dynamic "metric" {
30
- for_each = data. azurerm_monitor_diagnostic_categories . this . metrics
31
+ for_each = data. azurerm_monitor_diagnostic_categories . this [ 0 ] . metrics
31
32
content {
32
33
category = metric. value
33
34
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ terraform {
4
4
required_providers {
5
5
azurerm = {
6
6
source = " hashicorp/azurerm"
7
- version = " >= 3.23 .0"
7
+ version = " >= 3.40 .0"
8
8
}
9
9
}
10
10
}
You can’t perform that action at this time.
0 commit comments