@@ -44,13 +44,12 @@ resource "azurerm_application_insights" "application_insights" {
44
44
tags = module. labels . tags
45
45
}
46
46
47
-
48
47
resource "azurerm_application_insights_web_test" "main" {
49
48
count = var. enabled && var. web_test_enable ? length (var. list_of_test_urls ) : 0
50
49
name = element (var. web_test_name , count. index )
51
- location = join ( " " , azurerm_application_insights. application_insights . * . location )
50
+ location = azurerm_application_insights. application_insights [ 0 ] . location
52
51
resource_group_name = var. resource_group_name
53
- application_insights_id = join ( " " , azurerm_application_insights. application_insights . * . id )
52
+ application_insights_id = azurerm_application_insights. application_insights [ 0 ] . id
54
53
kind = var. kind
55
54
frequency = var. frequency
56
55
timeout = var. timeout
@@ -61,21 +60,20 @@ resource "azurerm_application_insights_web_test" "main" {
61
60
62
61
configuration = format (" %s%s%s" ,
63
62
local. test_header ,
64
- join (" " , formatlist (local. replace_body , random_uuid. test_guids . * . result [count . index ], random_uuid. test_guids . * . keepers . url [count . index ])),
63
+ join (" " , formatlist (local. replace_body , random_uuid. test_guids [count . index ]. result , random_uuid. test_guids [count . index ]. keepers . url )),
65
64
local. footer )
66
65
67
66
lifecycle {
68
67
ignore_changes = [
69
68
tags ,
70
69
]
71
70
}
72
-
73
71
}
74
72
75
73
resource "azurerm_monitor_diagnostic_setting" "main" {
76
74
count = var. enabled && var. diagnostic_setting_enable ? 1 : 0
77
75
name = format (" %s-application-insights-diagnostic-log" , module. labels . id )
78
- target_resource_id = join ( " " , azurerm_application_insights. application_insights . * . id )
76
+ target_resource_id = azurerm_application_insights. application_insights [ 0 ] . id
79
77
storage_account_id = var. storage_account_id
80
78
eventhub_name = var. eventhub_name
81
79
eventhub_authorization_rule_id = var. eventhub_authorization_rule_id
@@ -95,4 +93,4 @@ resource "azurerm_monitor_diagnostic_setting" "main" {
95
93
lifecycle {
96
94
ignore_changes = [log_analytics_destination_type ]
97
95
}
98
- }
96
+ }
0 commit comments