using below snippet I can create application insights and function_app but I am not sure how to configure function-app to use the created application insights.
module "resource_group" {
source = "git::ssh://address"
environment = "${var.environment}"
application = "${var.application}"
app_version = "${var.app_version}"
}
module "function_app" {
source = "git::ssh://address"
environment = "${var.environment}"
application = "${var.application}"
resource_group_name = "${module.resource_group.name}"
app_version = "${var.app_version}"
app_service_plan_id = "${module.app_service_plan.id}"
storage_primary_connection_string = "${module.storage_account.primary_connection_string}"
}
resource "azurerm_application_insights" "application_insights" {
name = "${var.environment}-${var.application}-appInsights"
location = "${module.resource_group.location}"
resource_group_name = "${module.resource_group.name}"
application_type = "Web"
}
but When I visit azure > function_app > Monitor, it still shows to configure application_insights.
any suggestion?

application_type = "Web"shouldn't be capitalized.