Azure Functions Deployment
Deployment workflows for Azure Functions using AZD.
Prerequisites
- Azure Functions project prepared with azd template
azure.yamlexists and validated.azure/deployment-plan.mdstatus =Validated- Azure Functions Core Tools (optional, for local debugging or when using
funccommands outside azd workflows)
AZD Deployment
Full Deployment (Infrastructure + Code)
bash
# Deploy everything
azd up --no-promptInfrastructure Only
bash
# Provision infrastructure without deploying code
azd provision --no-promptApplication Only
bash
# Deploy code to existing infrastructure
azd deploy --no-promptPreview Changes
bash
# Preview changes before deployment
azd provision --previewEnvironment Configuration
Set AZD Environment Variables
These are for azd provisioning, not application runtime:
bash
azd env set AZURE_LOCATION eastus2
azd env set VNET_ENABLED false⚠️ Important:
azd env setsets variables for the azd provisioning process, NOT application environment variables.
Verify Deployment
Check Function App Status
bash
# Show deployment details
azd showTesting HTTP Endpoints
⚠️ Never use
curl -I(HEAD) to test Azure Functions endpoints.Azure Functions
[HttpTrigger]with"get"does not automatically handle HEAD requests. HEAD returns 404 from the routing layer even when GET works correctly, causing false-negative results and misdirected debugging.
✅ DO — Use GET with output suppression
bash
# Check status code only (GET, don't follow redirects)