У меня есть лазурная функция, созданная локально с помощью Visual Studio. Я пытаюсь развернуть лазурную функцию с помощью terraform, но выдает ошибку
Код, который я пробую, показан ниже:
resource "azurerm_function_app" "testDeployTF" {
name = "testDeployADddecendant"
location = "${azurerm_resource_group.rg-testDeployTF.location}"
resource_group_name = "${azurerm_resource_group.rg-testDeployTF.name}"
app_service_plan_id = "${azurerm_app_service_plan.sp-testDeployTF.id}"
storage_connection_string = "DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxxxxxxxxx;EndpointSuffix=core.windows.net"
app_settings {
HASH = "${base64sha256(file("FunctionApp1.zip"))}"
WEBSITE_USE_ZIP = "https://${decendant.sa-testDeployTF.name}.blob.core.windows.net/${azurerm_storage_container.sc-testDeployTF.name}/${azurerm_storage_blob.sb-testDeployTF.name}${data.azurerm_storage_account_sas.sas-testDeployTF.sas}"
}
}
Если я удалю app_setting, код создаст новую пустую функцию, но я хочу, чтобы мне нужна новая функция с кодом, который у меня есть в моем локальном.
Приведенный выше код вызывает следующую ошибку, когда я использую app_seettings:
Ошибка: неподдерживаемый тип блока
в строке 78 terraformscript.tf в ресурсе «azurerm_function_app» «testDeployTF»: 78: app_settings {
Блоки типа app_settings здесь не ожидаются.