Skip to content

Azure App Service FunctionApp Module

Requirements

Name Version
terraform >= 1.0
azurerm >= 3.114.0
null >= 3.2.1

Providers

Name Version
azurerm >= 3.114.0
null >= 3.2.1

Resources

Name Type
azurerm_container_registry_webhook.slot resource
azurerm_container_registry_webhook.this resource
azurerm_function_app.this resource
azurerm_function_app_slot.this resource
azurerm_key_vault_access_policy.slot resource
azurerm_key_vault_access_policy.this resource
azurerm_private_endpoint.store resource
azurerm_role_assignment.acr_read resource
azurerm_role_assignment.appinsights_publish resource
azurerm_role_assignment.slot_acr_read resource
azurerm_role_assignment.slot_appinsights_publish resource
azurerm_storage_account.this resource
azurerm_storage_account_network_rules.this resource
null_resource.function_settings resource
null_resource.function_slot_settings resource
null_resource.vnet_integration resource
null_resource.vnet_integration_slot resource
azurerm_client_config.currentAzureRM data source
azurerm_container_registry.this data source

Inputs

Name Description Type Default Required
allowed_frontdoor_frontends List of Frontdoor Frontend Ids; to give access to the App Service Backend ([Rule_Name => Frontdoor_Frontend_Id]) list(map(string)) [] no
allowed_ip_networks Ordered list with mapping of IP Networks, in CIDR notation; to give access to the App Service ([Rule_Name => IP_CIDR]) list(map(string)) [] no
allowed_service_tags Ordered list of Service Tag objects; to give access to the App Service ([{name = Rule_Name, tag = Service_Tag}])
list(object({
name = string
tag = string
}))
[] no
allowed_subnets List of Subnet Ids; to give access to the App Service ([Rule_Name => Subnet_id]) list(map(string)) [] no
app_insights_id Id of the Application Insights Instance, to create RBAC role string n/a yes
app_name Required. Name of App Service Function string n/a yes
app_settings AppSettings block, will be merged with local.default_app_settings to make local.app_settings map(string) {} no
appplan_id Id of the App Service Plan, to host the App Service string n/a yes
connection_strings Collection of Connection String objects
map(object({
type = string
connstr = string
}))
{} no
container_registry_name Name of the Azure Container Registry Resource string n/a yes
container_registry_resource_group_name Name of the Azure Container Registry Resource string n/a yes
docker_image_name Path to the docker image, in the Azure Container Registry. If not provided, will use the app_name variable string null no
isDev Sets ASPNETCORE_ENVIRONMENT and AZURE_FUNCTIONS_ENVIRONMENT to 'Development' if true, and 'Production' if false bool false no
key_vault_id Azure Id of the Key Vault to give access to string null no
rg Resource Group object
object({
location = string
name = string
})
n/a yes
settings_trigger A integer specifying the serial number of the update command that applies function settings. Increment or decrement the value to force it to re-run, such as if a property gets modified incorrectly or the settings need to be reapplied number 0 no
site_config Site_Config block, will be merged with local.defaults_site_config to make local.site_config map(string) {} no
slot_app_settings AppSettings block, these are only overrides as it will be merged with full local.app_settings to make local.slot_app_settings map(string) {} no
slot_site_config Site_Config block, these are only overrides as it will be merged with full local.site_config to make local.slot_site_config map(string) {} no
slots List of App_Service slot objects. None by default list(any) [] no
storage_account_allow_all_networks Should firewall be open by default? Any Deny rules will still apply if set to true bool false no
storage_account_allowed_ip_cidr_list List of Allowed IP networks, in CIDR format. Must be /30 or larger and no Private subnets list(string) [] no
storage_account_name Name to give the Storage Account. If not provided, will prepend '-store' to the app_name variable string null no
storage_account_retention_in_days # Storage Account number 30 no
tags Tags to be merged with module tags (forming local.tags) map(string) {} no
vnet_integration_network_name Name of the Virtual Network for VNet Integration string null no
vnet_integration_subnet_id Id of the VNet Integration Subnet string null no
vnet_integration_subnet_name Name of the VNet Integration Subnet string null no
vnet_integration_trigger A integer specifying the serial number of the command that enables vnet integration. Increment or decrement the value to force it to re-run, such as if a property gets modified incorrectly or the settings need to be reapplied number 0 no
vnet_private_endpoint_subnet_id Id of the VNet Private_Endpoints Subnet string n/a yes
webhook_name Name to give the Deployment Webhook. If not provided, will prepend '-deployment-hook' to the app_name variable string null no

Outputs

Name Description
host_keys n/a
this n/a