使用terraform部署Azure powershell函数应用程序时出现问题
使用terraform部署azure function app blob触发器时,我面临以下错误 D:\a\1\s\src\RequestProcessor.cs:第196行 2021-01-08T14:24:46.222[错误]执行“Functions.BlobTrigger1”(失败,Id=973f1e27-3dc2-43d3-9463-7cac64bf56b7,持续时间=6625ms)结果:失败异常:无法安装函数应用程序依赖项。错误:在函数应用程序根文件夹C:\home\site\wwwroot中找到“No”requirements.psd1。 我用它来创建地形代码,通过使用上面的文档和google中的其他参考,我在main.tf中编写了下面的代码使用terraform部署Azure powershell函数应用程序时出现问题,azure,powershell,azure-functions,terraform,azure-blob-trigger,Azure,Powershell,Azure Functions,Terraform,Azure Blob Trigger,使用terraform部署azure function app blob触发器时,我面临以下错误 D:\a\1\s\src\RequestProcessor.cs:第196行 2021-01-08T14:24:46.222[错误]执行“Functions.BlobTrigger1”(失败,Id=973f1e27-3dc2-43d3-9463-7cac64bf56b7,持续时间=6625ms)结果:失败异常:无法安装函数应用程序依赖项。错误:在函数应用程序根文件夹C:\home\site\wwwr
app_settings = {
FUNCTIONS_WORKER_RUNTIME = var.FUNCTIONS_WORKER_RUNTIME
FUNCTIONS_WORKER_RUNTIME_VERSION = var.FUNCTIONS_WORKER_RUNTIME_VERSION
在variable.tf中指定变量,如下所示
variable "FUNCTIONS_WORKER_RUNTIME"{
default = "PowerShell"
}
variable "FUNCTIONS_WORKER_RUNTIME_VERSION" {
default = "~7"
}
但是仍然无法在应用程序中看到PowerShell核心版本。在我验证之后,您可以将
函数\u WORKER\u运行时的值设置为“PowerShell”
,而不是“PowerShell”
,并添加版本=“~3”
。它将自动安装函数app dependenciesrequirements.psd1
resource "azurerm_function_app" "example" {
name = "urewwwwfunctiona"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
storage_account_name = azurerm_storage_account.example.name
storage_account_access_key = azurerm_storage_account.example.primary_access_key
app_settings = {
FUNCTIONS_WORKER_RUNTIME = "powershell"
FUNCTIONS_WORKER_RUNTIME_VERSION = "~7"
}
version = "~3"
}
您好,我能够在Azure中使用azurerm_Function_应用程序部署Powershell函数应用程序,但Powershell核心版本为空
我听从了熊南希的建议,但没有成功:
resource "azurerm_function_app" "example" {
name = "functionapptest"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
storage_account_name = azurerm_storage_account.example.name
storage_account_access_key = azurerm_storage_account.example.primary_access_key
version = "~3"
app_settings = {
FUNCTIONS_WORKER_RUNTIME = "powershell"
FUNCTIONS_WORKER_RUNTIME_VERSION = "~7"
}
}
我可以使用Linux_fx_版本为Linux函数应用程序设置Python版本,但我想对Powershell执行同样的操作:
site_config {
linux_fx_version = "PYTHON|3.9"
}
Terraform文档不清楚Powershell函数应用程序。您使用哪种Terraform版本?所有的代码在我这边都很好用。