【发布时间】:2019-05-30 22:32:14
【问题描述】:
在从事件中心触发的 zip 部署函数应用中,应用的触发不一致(似乎仅在在 Azure 门户中调试应用时以及大约 15 分钟后才会触发)。
resource "azurerm_function_app" "helloworld" {
name = "helloworld-func"
location = "${azurerm_resource_group.helloworld.location}"
resource_group_name = "${azurerm_resource_group.helloworld.name}"
app_service_plan_id = "${azurerm_app_service_plan.helloworld.id}"
storage_connection_string = "${azurerm_storage_account.helloworld.primary_connection_string}"
version = "~2"
app_settings {
# key must match bindings.connection in functionapp/eventHubsMessages/function.json and must include EntityPath
# bindings.eventHubName in functionapp/eventHubMessages/function.json is purposelly kept empty to avoid overriding the EntityPath in connection string
# see https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs#output---configuration
LOGSEVENTHUBCONNECTIONSTRING = "${azurerm_eventhub_authorization_rule.helloworld.primary_connection_string}"
# TODO figure out how to use Azure AD and RBAC to allow the Function App access to the storage blob without a time-based token
WEBSITE_USE_ZIP = "${azurerm_storage_blob.helloworld.url}${data.azurerm_storage_account_sas.helloworld.sas}"
HASH = "${data.archive_file.helloworld.output_base64sha256}"
WEBSITE_NODE_DEFAULT_VERSION = "10.14.1"
}
}
【问题讨论】:
标签: azure terraform azure-eventhub terraform-provider-azure