Tutorial — Choose Your Hosting Plan¶
This tutorial section provides four independent, step-by-step tracks — one for each Azure Functions hosting plan. Every track covers the same seven topics so you can follow the complete journey from local development to production on whichever plan fits your PowerShell workload.
Which Plan Should I Start With?¶
flowchart TD
Start["I need to run PowerShell on Azure Functions"] --> Q1{"Need VNet / private networking?"}
Q1 -->|No| Q2{"Predictable monthly cost?"}
Q1 -->|Yes| Q3{"Scale to zero when idle?"}
Q2 -->|"Pay only when running"| CONS["Consumption (Y1)"]
Q2 -->|"Fixed monthly budget"| DEDI["Dedicated (App Service)"]
Q3 -->|Yes| FLEX["Flex Consumption (FC1)"]
Q3 -->|"No — always warm"| Q4{"Need deployment slots?"}
Q4 -->|Yes| PREM["Premium (EP)"]
Q4 -->|No| FLEX
style CONS fill:#0078d4,color:#fff
style FLEX fill:#107c10,color:#fff
style PREM fill:#ff8c00,color:#fff
style DEDI fill:#5c2d91,color:#fff Not sure yet? Start with Flex Consumption — it offers scale-to-zero with VNet integration and is Microsoft's recommended default for new projects. PowerShell 7.4 runs on Flex Consumption (Linux).
Plan Comparison at a Glance¶
| Feature | Consumption (Y1) | Flex Consumption (FC1) | Premium (EP) | Dedicated (ASP) |
|---|---|---|---|---|
| Scale to zero | ✅ | ✅ | ❌ (min 1 instance) | ❌ |
| VNet integration | ❌ | ✅ | ✅ | ✅ (Standard+) |
| Deployment slots | ✅ (Windows only) | ❌ | ✅ | ✅ (Standard+) |
| Default timeout | 5 min | 30 min | 30 min | 30 min |
| PowerShell version | 7.4 | 7.4 | 7.4 (7.6 preview, Windows) | 7.4 (7.6 preview, Windows) |
| Managed dependencies | ✅ | ❌ (bundle Modules) | ✅ | ✅ |
| OS | Windows / Linux | Linux only | Windows / Linux | Windows / Linux |
Managed dependencies on Flex Consumption
The requirements.psd1 managed dependency feature is not supported on Flex Consumption. Bundle modules in a Modules folder instead. See PowerShell Runtime.
Tutorial Tracks¶
Each track contains the same seven steps. Pick your plan and follow from start to finish.
flowchart TD
A[01 Run Locally] --> B[02 First Deploy]
B --> C[03 Configuration]
C --> D[04 Logging & Monitoring]
D --> E[05 Infrastructure as Code]
E --> F[06 CI/CD]
F --> G[07 Extending with Triggers] ☁️ Consumption (Y1)¶
Classic serverless — pay only when your functions execute. Best for lightweight, event-driven workloads that don't need VNet access.
| Step | Topic |
|---|---|
| 01 | Run Locally |
| 02 | First Deploy |
| 03 | Configuration |
| 04 | Logging & Monitoring |
| 05 | Infrastructure as Code |
| 06 | CI/CD |
| 07 | Extending with Triggers |
⚡ Flex Consumption (FC1)¶
Next-generation serverless — scale-to-zero with VNet integration. Microsoft's recommended default for new projects. PowerShell 7.4 on Linux.
| Step | Topic |
|---|---|
| 01 | Run Locally |
| 02 | First Deploy |
| 03 | Configuration |
| 04 | Logging & Monitoring |
| 05 | Infrastructure as Code |
| 06 | CI/CD |
| 07 | Extending with Triggers |
| 08 | Testing & Debugging |
🚀 Premium (EP)¶
Always-warm instances with VNet support and deployment slots. Best for latency-sensitive workloads or long-running functions.
| Step | Topic |
|---|---|
| 01 | Run Locally |
| 02 | First Deploy |
| 03 | Configuration |
| 04 | Logging & Monitoring |
| 05 | Infrastructure as Code |
| 06 | CI/CD |
| 07 | Extending with Triggers |
| 09 | Container Deployment |
🖥️ Dedicated (App Service Plan)¶
Traditional App Service hosting with predictable pricing. Best when you already have an App Service Plan with spare capacity.
| Step | Topic |
|---|---|
| 01 | Run Locally |
| 02 | First Deploy |
| 03 | Configuration |
| 04 | Logging & Monitoring |
| 05 | Infrastructure as Code |
| 06 | CI/CD |
| 07 | Extending with Triggers |
What Each Step Covers¶
| Step | Topic | You Will Learn |
|---|---|---|
| 01 | Run Locally | Scaffold a PowerShell app, run with Core Tools, test endpoints |
| 02 | First Deploy | Provision Azure resources and deploy your first function app |
| 03 | Configuration | Manage app settings, connection strings, and module dependencies |
| 04 | Logging & Monitoring | Configure Application Insights and structured logging |
| 05 | Infrastructure as Code | Define all resources in Bicep, deploy reproducibly |
| 06 | CI/CD | Automate build and deploy with GitHub Actions |
| 07 | Extending with Triggers | Add Timer, Queue, and Blob triggers beyond HTTP |
| 08 | Testing & Debugging | Unit test logic, mock triggers/bindings, integration test with Azurite, attach a debugger (Flex track) |
| 09 | Container Deployment | Package as a Linux container, push to ACR, deploy with managed-identity pull (Premium track) |