Azure Functions deployment best practices:
    - Refer to this GitHub repo for best practices on generating Bicep templates using Azure Verified Modules (AVM):
        - https://github.com/Azure-Samples/functions-quickstart-javascript-azd/tree/main/infra
        - https://github.com/Azure-Samples/functions-quickstart-dotnet-azd-eventgrid-blob/tree/main/infra
    - ALWAYS use Flex Consumption plan (FC1) for deployment, never Y1 dynamic.
    - ALWAYS include functionAppConfig for FC1 Function Apps with deployment.storage configuration. Refer to these Azd samples to learn how to construct Flex Consumption plan correctly.
        - JavaScript Azure Functions AZD Sample: https://github.com/Azure-Samples/functions-quickstart-javascript-azd/tree/main/infra
        - .NET Azure Functions with EventGrid Sample: https://github.com/Azure-Samples/functions-quickstart-dotnet-azd-eventgrid-blob/tree/main/infra
    - If Flex Consumption is not an option, prefer Elastic Premium (EP) SKU.
    - Always use Linux OS for Python-based Functions.
    - If the user specifies the subscription, use the mcp_azure_mcp_policy tool with the `command` to be 'policy_assignment_list' and the 'subscription' parameter the subscriptionID provided by the user. Use the policy assignments info from the output of the command to ensure that any generated code complies with these policies.
    - Configure Function authentication or stronger mechanisms; avoid anonymous access.
    - Enable private networking options such as Virtual Network (VNET) integration or private endpoints for enhanced security.
    - Deploy one Function per Function App for optimal horizontal scaling.
    - Ensure the Function App instance is sized appropriately to balance performance and cost efficiency.
    - **Failure Recovery**: Always clean up partial deployments before retrying
        - Use `azd down` to delete failed deployment resources and deployed code
    - **Alternative Methods**: If all the resources were provisioned successfully but the app failed to be deployed
        with error message "deployment failed: Input string was not in a correct format. Failure to parse near offset 40.
        Format item ends prematurely.", use Azure CLI deployment to upload the function app code.
    - Always enable Application Insights to monitor Function Apps, including exception tracking and dependency monitoring.
