Skip to content

[Flex consumption] Runtime error when trying to create a function placeholder #11379

@dambaron

Description

@dambaron

Investigative information

Please provide the following:

  • Timestamp: 26/09/2025 21:32:47+01:00
  • Function App version:
  • Function App name: func-aw6p5yjlqfdb2
  • Function name(s) (as appropriate): N/A
  • Invocation ID: N/A
  • Region: northeurope

Repro steps

Deploy the following template as a base

https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/IaC/bicep/main.bicep

Then add the following module

param functionAppName string

resource functionApp 'Microsoft.Web/sites@2024-11-01' existing = {
    name: functionAppName
}

resource fooFunction 'Microsoft.Web/sites/functions@2024-11-01' = {
  parent: functionApp
  name: 'foo-function'
  properties: {
    function_app_id: functionApp.id
    isDisabled: false
    language: 'python'
  }
}

Expected behavior

A new function is created, without bindings nor code. It is a simple placeholder to allow setting function keys and pass them to the APIM module afterwards.

My resource definition may be wrong but I guess the error message would be different then.

Furthermore trying to set host keys ends up with the same error message.

Actual behavior

The deployment fails with a BadRequest response caused by

{
    "status": "Failed",
    "error": {
        "code": "BadRequest",
        "message": "Encountered an error (InternalServerError) from host runtime.",
        "details": [
            {
                "message": "Encountered an error (InternalServerError) from host runtime."
            },
            {
                "code": "BadRequest"
            },
            {}
        ]
    }
}

Known workarounds

None

Related information

  • Programming language used: Python
  • Bindings used: None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions