【发布时间】:2020-11-09 10:58:44
【问题描述】:
当我尝试将现有应用服务部署到 Azure 时,我收到了 2020-10-29T22:27:58.8724283Z I1029 22:27:58.870264 4596 eventsink.go:78] eventSink::Infoerr(<{%reset%}>panic: interface conversion: interface {} is nil, not map[string]interface {} 2020-10-29T22:27:58.8728827Z <{%reset%}>) 2020-10-29T22:27:58.8735984Z I1029 22:27:58.870264 4596 eventsink.go:78] eventSink::Infoerr(<{%reset%}>goroutine 199 [running]: 2020-10-29T22:27:58.8767921Z <{%reset%}>) 2020-10-29T22:27:58.8778359Z I1029 22:27:58.870264 4596 eventsink.go:78] eventSink::Infoerr(<{%reset%}>github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web.expandAppServiceLogs(0x47f6180, 0xc0013eca00, 0x4, 0x47f6180, 0xc0013eca00, 0x1)。
此错误导致我的堆栈无法部署到 Azure。
var webApi = new AppService(appServiceName, new AppServiceArgs
{
Name = appServiceName,
ResourceGroupName = resourceGroupName,
Identity = new AppServiceIdentityArgs {Type = "SystemAssigned"},
AppServicePlanId = appServicePlanId,
AppSettings =
{
{"WEBSITE_RUN_FROM_PACKAGE", webApiCodeBlob},
{"AzureStorage__AccountName", storageAccountName},
{"AzureStorage__AccountKey", storageAccountPrimaryAccessKey},
{"APPINSIGHTS_INSTRUMENTATIONKEY", appInsightsInstrumentationKey},
{
"APPLICATIONINSIGHTS_CONNECTION_STRING", appInsightsConnectionString
},
{"ApplicationInsightsAgent_EXTENSION_VERSION", "~2"}
},
ConnectionStrings =
{
new AppServiceConnectionStringArgs
{
Name = "AzureServiceBusConnectionString",
Value = serviceBusConnectionString,
Type = "Custom"
},
new AppServiceConnectionStringArgs
{
Name = "BlobStorageConnectionString",
Value = blobConnectionString,
Type = "Custom"
},
new AppServiceConnectionStringArgs
{
Name = "MongoConnectionString",
Value = cosmosAccountConnectionString,
Type = "Custom"
}
},
SiteConfig = new AppServiceSiteConfigArgs
{
AlwaysOn = true,
Cors = new AppServiceSiteConfigCorsArgs
{
AllowedOrigins = allowedOrigins
}
},
Tags = new InputMap<string>()
{
{"team", Team},
{"product", Product},
{"productId", ProductId},
{"environment", environment},
{"service", ServiceName}
},
});
如果应用服务不存在,它会首次运行。这仅在部署现有应用服务时失败。只有在应用服务中没有定义日志部分时才会发生这种情况。
我正在使用 Pulumi 3.28.0
【问题讨论】: