https://github.com/techwatching/azurefunctionsflexconsumptionplan
Infrastructure code to provision a Function App on the Flex Consumption Plan
https://github.com/techwatching/azurefunctionsflexconsumptionplan
azure azure-functions flex-consumption pulumi typescript
Last synced: 7 months ago
JSON representation
Infrastructure code to provision a Function App on the Flex Consumption Plan
- Host: GitHub
- URL: https://github.com/techwatching/azurefunctionsflexconsumptionplan
- Owner: TechWatching
- Created: 2024-09-03T22:07:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-04T23:59:17.000Z (over 1 year ago)
- Last Synced: 2025-07-01T22:05:13.891Z (8 months ago)
- Topics: azure, azure-functions, flex-consumption, pulumi, typescript
- Language: TypeScript
- Homepage: https://techwatching.dev/posts/flex-consumption-plan
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Infrastructure code to provision a Function App on the Flex Consumption Plan
## What is it?
This repository contains 2 items:
- the infrastructure code (in the `infra` folder) needed to provision an Azure Function App on the Flex Consumption plan
- a basic .NET 8 isolated HTTP Trigger Azure Function (in the `src` folder)
This [blog article](https://techwatching.dev/posts/flex-consumption-plan) explains how to provision an Azure Function App on the Flex Consumption plan using the code on this repository.
The infrastructure code is a Pulumi TypeScript program that can be executed from the Pulumi CLI. When you execute it, it will provision the following resources:
- a Storage Account with a blob container in it
- a Function App and its associated Service Plan

I suggest you to read [the article](https://techwatching.dev/posts/flex-consumption-plan) before using this code. And if you are not familiar with Pulumi you should check their [documentation](https://www.pulumi.com/docs/) or [learning pathways](https://www.pulumi.com/learn/) too.
## How to use it?
### Prerequisites
You can check [Pulumi documentation](https://www.pulumi.com/docs/get-started/azure/begin/) to set up your environment.
You will have to install on your machine:
- Pulumi CLI
- Azure CLI
- pnpm
- Node.js (can be done using [pnpm](https://bordeauxcoders.com/manage-multiple-nodejs-versions))
You will need an Azure subscription.
You can use any [backend](https://www.pulumi.com/docs/intro/concepts/state/) for your Pulumi program (to store the state and encrypt secrets) but I suggest you to use the default backend: the Pulumi Cloud. It's free for individuals, you will just need to create an account on Pulumi website. If you prefer to use an Azure Blob Storage backend with an Azure Key Vault as the encryption provider you can check [this article](https://www.techwatching.dev/posts/pulumi-azure-backend).
### Execute the Pulumi program
- clone this repository
- log on to your Azure account using Azure CLI
- log on to your Pulumi backend using Pulumi CLI
- install the dependencies using pnpm
- run this command `pulumi up`