Function App
Overview
{
"function_app": {
"name": "func-app-{env}",
"@plan_name": "plan-consump-{env}",
"runtime": "dotnet",
"@storage_account_name": "ststorage{env}",
"instance_count": 2,
"max_instance_burst_count": 50,
"@application_insights_name": "appi-insights-{env}",
"@log_analytics_workspace_name": "log-workspace-{env}",
"cors": {
"allowed_origins": ["http://localhost:3000"],
"support_credentials": true
},
"app_settings": [
{
"type": "String",
"name": "MY_APP_SETTING",
"value": "MY_APP_SETTING_VALUE",
"slot": true
},
{
"type": "KeyVault",
"@key_vault_name": "kv-test-{env}",
"secret_name": "secretNameInsideTheKeyvault",
"slot": false
}
],
"custom_domains": [
{
"custom_domain": "fct.cyncly-platform.com",
"@dns_zone_name": "cycnly-platform.com",
"dns_zone_resource_group": "rg-dns"
}
],
"vnet_config": {
"@vnet_name": "vnet-int-{env}",
"@subnet_name": "snet-int-{env}"
},
"slot_settings": {
"enabled": true,
"name": "staging"
},
"location": "northeurope",
"external": false,
"resource_group_name": "my-rg-name",
"tags": { "example": "S0" }
}
}
Function App Definition
| Key | Value | Description |
|---|
name (required) | string | The name of the function app (see how to name) |
@plan_name (required) | string (reference to an app service plan) | A reference to a defined App Service plan |
runtime (required) | Runtime | Language that your function will be running |
@storage_account_name (required) | string (reference to a storage account) | A reference to a defined Storage Account |
@application_insights_name | string (reference to an application insights component) | A reference to a defined Application Insights component (defaults to no insights integration) |
@log_analytics_workspace_name | string (reference to a log workspace) | The name of the workspace that you want to attach to (defaults to no log integration) |
app_settings | array of AppSetting | The application settings to pass to the Function App (defaults to no settings) |
run_from_package | bool | Sets the deployment method to run from a package or not (defaults to true) |
instance_count | int | The number of application instances to run (defaults to 1) |
max_instance_burst_count | int | The maximum number of instances to run under high load (defaults to 100) |
custom_domains | array of CustomDomain | Custom Domains for your Function App (defaults to no custom domains) |
cors | CORS | The CORS configuration (defaults to no cors configuration) |
vnet_config | Virtual Network | Virtual Network configuration for your Function App (defaults to no vnet_config meaning no integration) |
slot_settings | SlotSettings | Deployment slot for the Function App (defaults to false) |
location | string | Resource Location (defaults to the resource group location) |
external | bool | A reference to an existing Function App (defaults to false) |
resource_group_name | string | The name of the resource group where the resource is located, only with external resources (defaults to the resource group of the deployment) |
tags | object | Additional tags for the resource (defaults to no additional tags) |
Runtime
| Value | Description |
|---|
custom | You will use this one if none of the options are the right one |
dotnet | If your application runs in Dotnet use this option |
java | If your application runs in Java use this option |
node | If your application runs in NodeJS use this option |
powershell | If your script runs in Powershell use this option |
python | If your application runs in Python use this option |
CustomDomain
| Value | Description |
|---|
custom_domain | The value of the custom domain (including parent domain) |
@dns_zone_name | The na` me of the dns zone in Azure |
dns_zone_resource_group | The name of the resource group that contains your dns zone |
AppSetting
| Value | Description |
|---|
type (required) | Either String or KeyVault |
name (required) | The name of the app setting |
value (for String) | The string value of the app setting |
@key_vault_name (for KeyVault) | The name of the Key Vault where the secret is |
secret_name (for KeyVault) | The name of the secret inside the Key Vault |
slot | Whether the setting is used for the slot or not (defaults to false) |
SlotSettings
| Key | Type | Description |
|---|
enabled (required) | bool | Whether the slot is activated or not |
name | string | The optional name value for the slot (defaults to preprod) |
Cors
| Key | Type | Description |
|---|
allowed_origins (required) | string[] | The list of origins to allow |
support_credentials (required) | bool | Whether credentials are allowed or not |