-
Notifications
You must be signed in to change notification settings - Fork 2
/
appinsights.tf
33 lines (28 loc) · 1.1 KB
/
appinsights.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module "application_insights" {
source = "[email protected]:hmcts/terraform-module-application-insights?ref=main"
env = var.env
product = var.product
location = var.location
application_type = var.application_type
resource_group_name = azurerm_resource_group.rg.name
daily_data_cap_in_gb = var.app_insights_data_cap
common_tags = var.common_tags
}
moved {
from = azurerm_application_insights.appinsights
to = module.application_insights.azurerm_application_insights.this
}
output "appInsightsInstrumentationKey" {
sensitive = true
value = module.application_insights.instrumentation_key
}
resource "azurerm_key_vault_secret" "app_insights_key" {
name = "AppInsightsInstrumentationKey"
value = module.application_insights.instrumentation_key
key_vault_id = module.vault.key_vault_id
}
resource "azurerm_key_vault_secret" "app_insights_connection_string" {
name = "app-insights-connection-string"
value = module.application_insights.connection_string
key_vault_id = module.vault.key_vault_id
}