Pulumi azure本机提供程序:azure WebApp:参数LinuxFxVersion的值无效
我使用Pulumi CLI和Pulumi azure本机提供程序:azure WebApp:参数LinuxFxVersion的值无效,azure,azure-web-app-service,azure-resource-manager,azure-app-service-plans,pulumi,Azure,Azure Web App Service,Azure Resource Manager,Azure App Service Plans,Pulumi,我使用Pulumi CLI和Pulumi new azure Typescript创建了一个新的Pulumi Typescript程序,并创建了以下index.ts(基于新版本): 现在运行一个pulumi up-y我得到以下错误: pulumi up -y Previewing update (dev) View Live: https://app.pulumi.com/jonashackt/spring-boot-pulumi-azure/dev/previews/3317933e-005
Pulumi new azure Typescript
创建了一个新的Pulumi Typescript程序,并创建了以下index.ts
(基于新版本):
现在运行一个pulumi up-y
我得到以下错误:
pulumi up -y
Previewing update (dev)
View Live: https://app.pulumi.com/jonashackt/spring-boot-pulumi-azure/dev/previews/3317933e-0051-4dfc-b436-8fe4184d11f5
Type Name Plan
pulumi:pulumi:Stack spring-boot-pulumi-azure-dev
+ └─ azure-native:web:WebApp spring-boot-vuejs-azure create
Outputs:
+ helloEndpoint: output<string>
Resources:
+ 1 to create
3 unchanged
Updating (dev)
View Live: https://app.pulumi.com/jonashackt/spring-boot-pulumi-azure/dev/updates/5
Type Name Status Info
pulumi:pulumi:Stack spring-boot-pulumi-azure-dev **failed** 1 error
+ └─ azure-native:web:WebApp spring-boot-vuejs-azure **creating failed** 1 error
Diagnostics:
azure-native:web:WebApp (spring-boot-vuejs-azure):
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"]}}]
pulumi:pulumi:Stack (spring-boot-pulumi-azure-dev):
error: update failed
Resources:
3 unchanged
Duration: 22s
pulumi up-y
预览更新(开发)
现场观看:https://app.pulumi.com/jonashackt/spring-boot-pulumi-azure/dev/previews/3317933e-0051-4dfc-b436-8fe4184d11f5
类型名称计划
pulumi:pulumi:Stack spring boot pulumi azure开发
+ └─ azure本机:web:WebApp春季启动vuejs azure创建
产出:
+helloEndpoint:输出
资源:
+1创建
3不变
更新(开发)
现场观看:https://app.pulumi.com/jonashackt/spring-boot-pulumi-azure/dev/updates/5
键入名称状态信息
pulumi:pulumi:Stack spring引导pulumi azure开发**失败**1错误
+ └─ azure本机:web:WebApp春季启动vuejs azure**创建失败**1错误
诊断:
azure本机:web:WebApp(spring boot vuejs azure):
错误:Code=“BadRequest”Message=“参数LinuxFxVersion具有无效值。”详细信息=[{“Message”:“参数LinuxFxVersion具有无效值。”},{“Code”:“BadRequest”},{“ErrorEntity”:{“Code”:“BadRequest”,“ExtendedCode”:“01007”,“Message”:“参数LinuxFxVersion具有无效值。”,“MessageTemplate”:“参数{0}”具有无效值。“,”参数“:[“LinuxFxVersion”]}]
pulumi:pulumi:Stack(春季启动pulumi azure开发):
错误:更新失败
资源:
3不变
持续时间:22秒
还有。如本文所述,问题在于Azure.web.AppServicePlan
中的Azure AppService配置。虽然我们设置了种类:“Linux”
,但它实际上是一台Windows机器
缺少的参数是AppService中的reserved:true,
:
const appServicePlan = new azure.web.AppServicePlan("sp-spring-boot", {
location: resourceGroup.location,
resourceGroupName: resourceGroup.name,
kind: "Linux",
reserved: true,
sku: {
name: "B1",
tier: "Basic",
},
});
没有将reserved
参数设置为true,我们就得到了一台Windows机器。如果您使用kind:“Linux”
而不使用以下参数,这甚至会出现在Azure门户中:
const appServicePlan = new azure.web.AppServicePlan("sp-spring-boot", {
location: resourceGroup.location,
resourceGroupName: resourceGroup.name,
kind: "Linux",
reserved: true,
sku: {
name: "B1",
tier: "Basic",
},
});