HTTP Trigger template (Azure Functions)
Create your first Arcus Azure Functions with HTTP Trigger project
First, install the template from NuGet:
> dotnet new --install Arcus.Templates.AzureFunctions.Http
When installed, the template can be created with shortname: arcus-az-func-http
:
> dotnet new arcus-az-func-http --name Arcus.Demo.AzureFunctions.Http
Features
Creates a starter worker project with by default configured:
-
Arcus secret store setup with Azure Key Vault secret provider (see more info here on what this includes)
-
Serilog as logging mechanism with default enrichers (version, application, and correlation when appropriate), sinking to Application Insights.
-
Example Azure Function HTTP 'order' trigger with:
- HTTP correlation (see more info here on what this includes)
- Request content and header to restrict to JSON content and JSON parsing with data model annotations validation
- General exception handling that results in 500 Internal Server Error
- OpenAPI docs generation and UI (see more info here)
- Dockerfile
Configuration
And additional features available with options:
--functions-worker
: Configures the type of Azure Functions worker type the project should target.isolated
(default): Uses the isolated Azure Functions worker type which runs on a different process as the Azure FunctioninProcess
: Uses the in-process Azure Functions worker type which runs on the same process as run Azure Function For more information on the difference between the two, see Microsoft's documentation.
--include-healthchecks
(defaultfalse
): include a default Health Azure Function and health check services from the project--exclude-openapi
(defaultfalse
): exclude the Azure Functions OpenAPI docs generation and UI from the project.--exclude-serilog
(defaultfalse
): exclude the Serilog logging infrastructure in the Azure Functions project which includes default enrichers (version and application), and sinking to Application Insights.
Security
As part of this template the following HTTP header value(s) are removed for security sake:
Server
header * Provides information concerning the web runtime