Share via

Azure Function Linux Python 3.9 problem

Xiuyang Bobby Sun 105 Reputation points
2024-02-16T18:22:49.2633333+00:00

Good day, we have a solution in Azure Sentinel. When we deploy the solution, everything looks fine, but when we use the Deploy to Azure to deploy the data connector, we got this error:

{
    "status": "Failed",
    "error": {
        "code": "BadRequest",
        "message": "The parameter LinuxFxVersion has an invalid value.",
        "details": [
            {
                "message": "The parameter LinuxFxVersion has an invalid value."
            },
            {
                "code": "BadRequest"
            },
            {}
        ]
    }
}

The link to the azuredeploy file is: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Fortinet%20FortiNDR%20Cloud/Data%20Connectors/azuredeploy_FortinetFortiNdrCloud_API_FunctionApp.json I have tried to compare our implementation with other Solutions in the repo, but couldn't find anything that would cause the issue. Could you please give some suggestions about what is wrong?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

Microsoft Security | Microsoft Sentinel
0 comments No comments

Answer accepted by question author
  1. MuthuKumaranMurugaachari-MSFT 22,451 Reputation points Moderator
    2024-02-21T19:27:45.8133333+00:00

    Xiuyang Bobby Sun Thanks for posting your question in Microsoft Q&A. Quickly reviewing the template https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Fortinet%20FortiNDR%20Cloud/Data%20Connectors/azuredeploy_FortinetFortiNdrCloud_API_FunctionApp.json#L101-L116, found that reserved is missing in Microsoft.Web/serverfarms template which is needed for Linux app service plan and after modifying the template as below (in your original template), works well (tested in my test sub).

    {
                "type": "Microsoft.Web/serverfarms",
                "apiVersion": "2018-02-01",
                "name": "[variables('FunctionName')]",
                "location": "[resourceGroup().location]",
                "sku": {
                    "name": "Y1",
                    "tier": "Dynamic"
                },
                "kind": "functionapp",
                "properties": {
                    "name": "[variables('FunctionName')]",
                    "workerSize": "0",
                    "workerSizeId": "0",
                    "numberOfWorkers": "1",
                    "reserved": true
                }
            }
    

    Checkout AppServicePlanProperties for more info about this template and properties. User's image

    I hope this helps and let me know if any questions.


    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Ryan Hill 30,336 Reputation points Microsoft Employee Moderator
    2024-02-16T20:37:59.89+00:00

    Hi @Xiuyang Bobby Sun
    Your linuxFxVersion doesn't match az webapp list-runtimes --os linux. Instead of using |, use : instead, e.g. python:3.9.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.