Skip to content

Azure App Service WebApp Module

Requirements

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

Providers

Name Version
azurerm >= 3.21.0
null >= 3.2.1

Resources

Name Type
azurerm_app_service.this resource
azurerm_app_service_slot.this resource
azurerm_container_registry_webhook.slot resource
azurerm_key_vault_access_policy.slot resource
azurerm_key_vault_access_policy.this resource
azurerm_role_assignment.acr_read resource
azurerm_role_assignment.slot_acr_read 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_name Required. Name of App Service WebApp 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 string n/a yes
isDev Sets ASPNETCORE_ENVIRONMENT and AZURE_FUNCTIONS_ENVIRONMENT to 'Development' if true, and 'Production' if false bool false no
key_vault_id Required. Azure Id of the Key Vault to give access to string n/a yes
log_retention_in_days Log retention in days. Remove files older than X days. number 30 no
log_retention_in_mb Maximum size in megabytes that log files can use. 25-100 number 35 no
rg Resource Group object
object({
location = string
name = string
})
n/a yes
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. Defaults to a single slot named 'deploy' list(any)
[
{
"name": "deploy"
}
]
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
webhook_name Name to give the Deployment Webhook string n/a yes

Outputs

Name Description
slot AppService WebApp Deployment Slot object
this AppService WebApp object