gpt4 book ai didi

azure - 如何使用 Terraform 设置我的 azure 函数的平台?

转载 作者:行者123 更新时间:2023-12-03 04:47:45 25 4
gpt4 key购买 nike

我正在尝试将我的 Azure 函数的平台更改为 64 位,以与新的 dll 或项目需求兼容。我只是无法找到相应的 terraform 键来设置此 azure 函数字段。问题是 terraform 目前默认为 32 位,因此每当我部署字段时都会发生变化。 enter image description here任何帮助,将不胜感激。谢谢!

我尝试使用 Microsoft documentation 中的一些 app_settings 键进行探索,但它们似乎都与平台版本没有明显的联系。我也尝试过查看这里的键 terraform documentation 我也没有想到这些。

这是我的 terraform 未显示 app_settings

resource "azurerm_app_service_plan" "plan" {
count = length(var.resource_groups)
name = "${var.name}-asp${count.index + 1}"
location = var.resource_groups[count.index].location
resource_group_name = var.resource_groups[count.index].name
kind = "FunctionApp"

sku {
tier = var.app_service_plan_tier
size = var.app_service_plan_size
}

tags = var.tags
}

resource "azurerm_function_app" "function" {
count = length(azurerm_app_service_plan.plan.*)
name = "${var.name}${count.index + 1}"
location = azurerm_app_service_plan.plan[count.index].location
resource_group_name = azurerm_app_service_plan.plan[count.index].resource_group_name
app_service_plan_id = azurerm_app_service_plan.plan[count.index].id
storage_account_name = var.storage_account_name
storage_account_access_key = var.storage_account_access_key
app_settings = local.app_settings
version = "~2"
https_only = true
tags = var.tags
}

最佳答案

管理工作线程配置的资源是 azurerm_function_app 资源。

设置属性use_32_bit_worker_process设置为 true 将在 32 位平台上运行应用程序,这是默认值。

use_32_bit_worker_process 显式设置为 false,并确保使用除免费或共享之外的任何其他层,如文档中所述:

when using an App Service Plan in the Free or Shared Tiers use_32_bit_worker_process must be set to true.

关于azure - 如何使用 Terraform 设置我的 azure 函数的平台?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75462785/

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