织梦CMS - 轻松建站从此开始!

欧博ABG官网-欧博官方网址-会员登入

TDG游戏he parameter LinuxFxVersion has an invalid va

时间:2025-07-16 19:20来源: 作者:admin 点击: 6 次
Hi, I would like to create an Azure Web App Service, which uses a docker image from an Azure Container Registry. I am using the following terraform

I would like to create an Azure Web App Service, which uses a docker image from an Azure Container Registry.

I am using the following terraform script:

terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = "3.9.0" } } backend "azurerm" { resource_group_name = "myproject-westeurope-rg" storage_account_name = "myprojectsharedstorage" container_name = "terraform" key = "admin/terraform.tfstate" } } provider "azurerm" { features {} } locals { rg-myproject = azurerm_resource_group.myproject.name location = "westeurope" } resource "random_id" "uniqueid" { byte_length = 4 } resource "azurerm_resource_group" "myproject" { name = "myproject-westeurope-rg" location = local.location } resource "azurerm_container_registry" "myproject-acr" { admin_enabled = true location = local.location name = "myprojectacr${random_id.uniqueid.hex}" resource_group_name = local.rg-myproject sku = "Basic" } resource "azurerm_service_plan" "azappplan" { name = "azappplan" location = local.location resource_group_name = local.rg-myproject os_type = "Linux" sku_name = "P1v3" } resource "azurerm_linux_web_app" "azapp-docker" { name = "azapp-docker-${random_id.uniqueid.hex}" location = local.location resource_group_name = local.rg-myproject service_plan_id = azurerm_service_plan.azappplan.id https_only = true client_affinity_enabled = true identity { type = "SystemAssigned" } site_config { always_on = "true" #linux_fx_version = "DOTNETCORE|6.0" application_stack { docker_image = "DOCKER|${azurerm_container_registry.myproject-acr.login_server}/myimage:latest" docker_image_tag = "latest" dotnet_version = "6.0" } } } resource "azurerm_linux_web_app_slot" "azapp-docker-staging" { name = "staging" app_service_id = azurerm_linux_web_app.azapp-docker.id https_only = true client_affinity_enabled = true site_config { } }

If I execute that script I get the following error:

Error: creating Linux Web App: (Site Name “azapp-docker-12345678” / Resource Group “myproject-westeurope-rg”): web.AppsClient#CreateOrUpdate: Failure sending request: StatusCode=400 – Original Error: Code=“BadRequest” Message=“The parameter LinuxFxVersion has an invalid value.” Details=[{“Message”:“The parameter LinuxFxVersion has an invalid value.”},{“Code”:“BadRequest”},{“ErrorEntity”:{“Code”:“BadRequest”,“ExtendedCode”:“01007”,“Message”:“The parameter LinuxFxVersion has an invalid value.”,“MessageTemplate”:“The parameter {0} has an invalid value.”,“Parameters”:[“LinuxFxVersion”]}}]

If I try to set linux_fx_version I get the following error:

Can’t configure a value for “site_config.0.linux_fx_version”: its value will be decided automatically based on the result of applying this configuration.

Could someone please tell me, what I am doing wrong? I can’t find any missing configurations in the documentation.

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-07-27 16:07 最后登录:2025-07-27 16:07
栏目列表
推荐内容