gpt4 book ai didi

azure - 为 Azure Function App (Terraform) 配置 Application Insights

转载 作者:行者123 更新时间:2023-12-02 14:54:33 26 4
gpt4 key购买 nike

使用下面的代码片段,我可以创建应用程序见解和 function_app,但我不确定如何配置 function-app 以使用创建的应用程序见解。

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"
}

但是当我访问azure > function_app > Monitor时,它仍然显示配置application_insights。

configure application insights

有什么建议吗?

最佳答案

请参阅此处的示例:https://www.olivercoding.com/2018-06-24-terraform/ 。您需要将 APPINSIGHTS_INSTRUMENTATIONKEY 添加到函数应用的 app_settings 中。

关于azure - 为 Azure Function App (Terraform) 配置 Application Insights,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53613257/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com