Skip to content

data-platform-hq/terraform-azurerm-linux-web-app

Repository files navigation

Azure Linux Web App Terraform module

Terraform module for creation Azure Linux Web App

Usage

Requirements

Name Version
terraform >= 1.0.0
azurerm >= 3.49.0

Providers

Name Version
azurerm 3.27.0

Modules

No modules.

Resources

Name Type
azurerm_app_service_virtual_network_swift_connection.this resource
azurerm_application_insights.this resource
azurerm_key_vault_access_policy.this resource
azurerm_linux_web_app.this resource
azurerm_monitor_diagnostic_setting.this resource
azurerm_monitor_diagnostic_categories.this data source

Inputs

Name Description Type Default Required
analytics_destination_type Possible values are AzureDiagnostics and Dedicated. string "Dedicated" no
analytics_workspace_id Resource ID of Log Analytics Workspace string null no
app_settings Application setting map(string) {} no
application_stack Application stack configuration, run az webapp list-runtimes --os-type linux to get the list of supported stacks map(string)
{
"java_server": "JAVA",
"java_server_version": 11,
"java_version": "11"
}
no
application_type Application type (java, python, etc) string "java" no
client_affinity_enabled Improve performance of your stateless app by turning Affinity Cookie off, stateful apps should keep this setting on for compatibility bool false no
enable_appinsights Enable application insights bool true no
enable_diagnostic_setting Enable diagnostic setting. var.analytics_workspace_id must be provided bool false no
env Environment string n/a yes
identity_ids List of user assigned identity IDs list(string) null no
ip_restriction Firewall settings for the function app
list(object({
name = string
ip_address = optional(string, null)
service_tag = optional(string, null)
virtual_network_subnet_id = optional(string, null)
priority = optional(string, "100")
action = string
headers = optional(list(object({
x_azure_fdid = optional(list(string), null)
x_fd_health_probe = optional(list(string), null)
x_forwarded_for = optional(list(string), null)
x_forwarded_host = optional(list(string), null)
})), [])
}))
[
{
"action": "Allow",
"name": "allow_azure",
"service_tag": "AzureCloud"
}
]
no
key_vault Configure Linux Function App to Key Vault
object({
id = optional(string, null)
key_permissions = optional(list(string), null)
secret_permissions = optional(list(string), ["Get", "List"])
storage_permissions = optional(list(string), null)
})
{} no
location Location string n/a yes
logs Logs configuration
object({
detailed_error_messages = bool
failed_request_tracing = bool
http_logs = object({
file_system = object({
retention_in_days = number
retention_in_mb = number
})
})
})
{
"detailed_error_messages": false,
"failed_request_tracing": false,
"http_logs": {
"file_system": {
"retention_in_days": 7,
"retention_in_mb": 35
}
}
}
no
name Web index/name (like 007) string n/a yes
project Project name string n/a yes
resource_group Resource group name string n/a yes
scm_ip_restriction Firewall settings for the function app
list(object({
name = string
ip_address = optional(string, null)
service_tag = optional(string, null)
virtual_network_subnet_id = optional(string, null)
priority = optional(string, "100")
action = string
headers = optional(list(object({
x_azure_fdid = optional(list(string), null)
x_fd_health_probe = optional(list(string), null)
x_forwarded_for = optional(list(string), null)
x_forwarded_host = optional(list(string), null)
})), [])
}))
[
{
"action": "Allow",
"name": "allow_azure",
"service_tag": "AzureCloud"
}
]
no
service_plan_id App Service plan ID string n/a yes
site_config Site configuration
object({
always_on = optional(bool, true)
ftps_state = optional(string, "Disabled")
http2_enabled = optional(bool, true)
websockets_enabled = optional(bool, false)
use_32_bit_worker = optional(bool, false)
container_registry_use_managed_identity = optional(bool, false)
container_registry_managed_identity_client_id = optional(string, null)
worker_count = optional(number, null)
})
{} no
storage_account BYOS storage mount configuration
list(object({
access_key = string
account_name = string
name = string
share_name = string
type = string
mount_path = string
}))
[] no
subnet_id Subnet ID for the web app string null no
tags Tags map(string) n/a yes
use_private_net Use private network injection bool false no

Outputs

Name Description
default_hostname Linux Web App default hostname
id Linux Web App ID
identity Linux Web App Managed Identity

License

Apache 2 Licensed. For more information please see LICENSE