Skip to content

Support host.functionapp as an azd add / compose resource type聽#10245

Description

馃

Describe the feature request

azd's compose resources (azd add -> "Host service") support host.containerapp and host.appservice. For those, azd writes both the resources: entry and the services: entry in azure.yaml, and it generates the infrastructure. Azure Functions has no equivalent. host: function can be deployed, but there is no host.functionapp resource type, so a Function App can't be added through azd add and doesn't get generated infrastructure.

Please add a host.functionapp resource type alongside the existing two, e.g.:

resources:
  api:
    type: host.functionapp
    runtime:
      stack: python
      version: "3.12"
    uses:
      - storage
services:
  api:
    host: function
    project: src/api
    language: python

The generated infrastructure would ideally default to the Flex Consumption plan (FC1), with a storage account, managed identity auth for host storage, Application Insights, and the azd-service-name tag. That lines up with the Functions AVM patterns and the current azd init Functions templates.

Why this matters

The Azure extension for VS Code creates Function Apps through azd. Today it has to ship its own Bicep for Function Apps and write the services: entry in azure.yaml itself. For Container Apps and App Service we'd prefer to hand all of that to azd, and host.functionapp would let Functions follow the same path. It also means users get the same result whether they start from the CLI or from VS Code.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions