我试图使用azurerm_app_service_virtual_network_swift_connection
与azurerm_linux_function_app
,但得到这个错误,即使我是在支付,你去潜艇。
│ Error: creating/updating App Service VNet association between "rd-func8-func" (Resource Group "rg-rd-func8") and Virtual Network "rdfunc8-vnet": web.AppsClient#CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Feature Create Swift Virtual Network is not allowed for a free trial subscription." Details=[{"Message":"Feature Create Swift Virtual Network is not allowed for a free trial subscription."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","ExtendedCode":"52018","Message":"Feature Create Swift Virtual Network is not allowed for a free trial subscription.","MessageTemplate":"Feature {0} is not allowed for a free trial subscription.","Parameters":["Create Swift Virtual Network"]}}]
│
│ with module.function.azurerm_app_service_virtual_network_swift_connection.example,
│ on modules/function/function.tf line 28, in resource "azurerm_app_service_virtual_network_swift_connection" "example":
│ 28: resource "azurerm_app_service_virtual_network_swift_connection" "example" {
TF看起来像这样
resource "azurerm_linux_function_app" "this" {
name = lower(format("%s-%s-func", var.client_name, var.project_name))
resource_group_name = var.resource_group_name
location = var.resource_group_location
storage_account_name = var.storage_account_name
storage_account_access_key = var.storage_account_access_key
service_plan_id = var.service_plan_id
app_settings = {
FUNCTIONS_WORKER_RUNTIME = "node"
}
site_config {
application_stack {
node_version = 18
}
}
}
resource "azurerm_app_service_virtual_network_swift_connection" "example" {
app_service_id = azurerm_linux_function_app.this.id
subnet_id = var.virtual_network_subnet_id
}
Azure门户订阅
1条答案
按热度按时间l7wslrjt1#
我在现收现付订阅帐户上的以下应用程序服务计划SKU中也遇到了同样的错误。
要解决此错误,请选择列出的应用程序服务计划。
对于测试,我选择了Premium v2 P1V2计划。
运行代码后成功创建资源。
参考:azurerm_app_service_virtual_network_swift_connection