在部署应用服务CDN端点时,Terraform脚本错误。

问题描述 投票:0回答:1

在部署时出现以下错误。

Error: Error waiting for CDN Endpoint "website-dev-appservice" (Profile "website-dev-eastus2-cdn" / Resource Group "website-dev-eastus2-rg") to finish creating: Code="BadRequest" 

Message="{\"ErrorMessage\":\"Errors found in Model: OriginHostHeader must match the regex '(^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])$)|((?:[:0-9A-Fa-f]+))'.\"}"

可能是什么问题?

azure-web-app-service terraform-provider-azure azure-cdn
1个回答
1
投票

虽然hashicorp文档中说origin_host_header是一个可选的字段,但这里Scripts需要指定origin_host_header,默认值是域名,例如origin_host_header = www.google.comJust 添加origin_host_header,应该就可以了。

© www.soinside.com 2019 - 2024. All rights reserved.