This repository contains links to quickstart samples, end to end samples, and infrastructure as code examples for Azure Functions Flex Consumption. Check out the Azure documentation to learn more about Azure Functions Flex Consumption.
These starters samples give you the code + IaC (Azure Dev CLI enabled) to build and deploy simple/common scenarios to Flex Consumption.
Simple HTTP services that handle GET and POST requests, with code and Azure Developer CLI (AZD) templates for easy deployment:
Simple blob triggered functions that use the Event Grid source type to process blobs quickly, with code and Azure Developer CLI (AZD) templates for easy deployment:
- .NET Isolated / C#
- Python
- JavaScript
- TypeScript
- Java - Upcoming
- PowerShell
Quickstarts for building timer triggered function apps in Flex Consumption.
Quickstarts for building Azure Cosmos DB triggered function apps in Flex Consumption.
Quickstarts for building Azure SQL triggered function apps in Flex Consumption.
Quickstarts for building Azure Service Bus triggered function apps in Flex Consumption.
Quickstarts for running Durable Functions function apps in Flex Consumption.
Quickstarts to easily build and deploy a custom remote MCP server to the cloud using Azure functions.
Quickstarts for remote hosting of MCP servers built with the official Anthropic MCP SDKs on Azure Functions Flex Consumption.
The following end to end samples are available in this repository for different Flex Consumption app scenarios:
- High scale HTTP function app to Event Hubs via VNet: An HTTP function written in .NET that accepts calls from any source, and then sends the body of those HTTP calls to a secure Event Hubs hub behind a VNet using VNet integration.
- High Scale stream processing of vehicle telemetry using Event Hubs: This demo showcases a real-time event processing solution using Azure Event Hubs and Azure Functions with Flex Consumption plan.
- Service Bus trigger behind a VNet: A Service Bus queue triggered function written in Python that triggers from a VNet restricted service bus via private endpoint. A Virtual Machine in the VNet is used to send messages.
- PDF to text processor: A blob triggered function using Event Grid written in Node that processes PDF documents into text at scale.
- Order processing workflow with Azure Durable Functions: Implement an order processing workflow using Durable Functions and Flex Consumption.
- SignalR Bidirectional chatroom sample: This is a chatroom walkthrough sample that demonstrates bidirectional message pushing between Azure SignalR Service and Azure Functions in a serverless scenario using the Flex Consumption hosting plan and .NET.
Flex Consumption has made some significant improvements to the control plane compared to other Azure Functions hosting plans. The following foundational samples are available in this repository for creating a Flex Consumption app that you should review and copy if you are automating the creation of your function apps with ARM, Bicep, or Terraform:
- ARM (Azure Resource Manager): Contains a sample for deploying Azure Functions using ARM templates.
- Bicep: Contains a sample for deploying Azure Functions using Bicep templates.
- Terraform AzAPI Provider: Contains a sample for deploying Azure Functions using Terraform scripts using the AzAPI provider.
- Terraform AzureRM Provider: Contains samples for deploying Azure Functions using Terraform scripts using the AzureRM provider.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.