Azure / azure-saas

The Azure SaaS Development Kit (ASDK) provides a reference architecture, deployable reference implementation and tools to help developers, startups, ISVs and Enterprises deliver their applications as a SaaS service. A platform for platform creators.
https://aka.ms/azuresaasdevkit
326 stars 239 forks source link

Retention settings failure #238

Closed fbomb111 closed 10 months ago

fbomb111 commented 10 months ago

Failure on running start.sh of permission deployment

"details":[{"code":"BadRequest","target":"/subscriptions/ad4c9615-c9ee-4529-aca8-cb5a32e96b96/resourceGroups/rg-fc-para-tzqf/providers/Microsoft.Resources/deployments/PermissionApi","message":"{\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Diagnostic settings does not support retention for new diagnostic settings.\"\r\n}"}]}]}]}}

I think Azure changed ability to configure diagnostic settings programmatically very recently. Related issue: https://github.com/hashicorp/terraform-provider-azurerm/issues/23051

This error seemed to be resolved by setting the retention policy days to 0 in .../src/Saas.Lib/Saas.Bicep.Module/appServiceModuleWithObservability.bicep

1iveowl commented 10 months ago

Thanks @fbomb111, agree this looks like an issue introduced by recent changes.

Would you like to do a PR with the change to .../src/Saas.Lib/Saas.Bicep.Module/appServiceModuleWithObservability.bicep?

1iveowl commented 10 months ago

Did some more research: Migrate from diagnostic settings storage retention to Azure Storage lifecycle management .