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

KeyValueDescription
name (required)stringThe 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)RuntimeLanguage 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_namestring (reference to an application insights component)A reference to a defined Application Insights component (defaults to no insights integration)
@log_analytics_workspace_namestring (reference to a log workspace)The name of the workspace that you want to attach to (defaults to no log integration)
app_settingsarray of AppSettingThe application settings to pass to the Function App (defaults to no settings)
run_from_packageboolSets the deployment method to run from a package or not (defaults to true)
instance_countintThe number of application instances to run (defaults to 1)
max_instance_burst_countintThe maximum number of instances to run under high load (defaults to 100)
custom_domainsarray of CustomDomainCustom Domains for your Function App (defaults to no custom domains)
corsCORSThe CORS configuration (defaults to no cors configuration)
vnet_configVirtual NetworkVirtual Network configuration for your Function App (defaults to no vnet_config meaning no integration)
slot_settingsSlotSettingsDeployment slot for the Function App (defaults to false)
locationstringResource Location (defaults to the resource group location)
externalboolA reference to an existing Function App (defaults to false)
resource_group_namestringThe name of the resource group where the resource is located, only with external resources (defaults to the resource group of the deployment)
tagsobjectAdditional tags for the resource (defaults to no additional tags)

Runtime

ValueDescription
customYou will use this one if none of the options are the right one
dotnetIf your application runs in Dotnet use this option
javaIf your application runs in Java use this option
nodeIf your application runs in NodeJS use this option
powershellIf your script runs in Powershell use this option
pythonIf your application runs in Python use this option

CustomDomain

ValueDescription
custom_domainThe value of the custom domain (including parent domain)
@dns_zone_nameThe na` me of the dns zone in Azure
dns_zone_resource_groupThe name of the resource group that contains your dns zone

AppSetting

ValueDescription
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
slotWhether the setting is used for the slot or not (defaults to false)

SlotSettings

KeyTypeDescription
enabled (required)boolWhether the slot is activated or not
namestringThe optional name value for the slot (defaults to preprod)

Cors

KeyTypeDescription
allowed_origins (required)string[]The list of origins to allow
support_credentials (required)boolWhether credentials are allowed or not