/terraform-azurerm-function-app-linux

Terraform module for managing Azure Linux Function App

Primary LanguageHCLApache License 2.0Apache-2.0

Azure Linux Function App Terraform module

Terraform module for creation Azure Linux Function App

Usage

Requirements

Name Version
terraform >= 1.0.0
azurerm >= 3.49.0

Providers

Name Version
azurerm 3.24.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_function_app.this resource
azurerm_monitor_diagnostic_setting.this resource
azurerm_role_assignment.log_storage_account_blob_data_owner resource
azurerm_role_assignment.log_storage_account_contributor resource
azurerm_role_assignment.log_storage_account_queue_data_contributor resource
azurerm_role_assignment.storage resource
azurerm_function_app_host_keys.this data source
azurerm_function_app_host_keys.this_vnet data source
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 map(string)
{
"java_version": "11"
}
no
application_type Application type (java, python, etc) string "java" no
azure_rbac Azure RBAC permision map (scope, role) list(map(string)) [] 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
log_storage_id Logs storage account ID (to set permissions on it) string null no
log_storage_name Logs storage account name string n/a yes
name Function 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
subnet_id Subnet ID for the function app string null no
tags Tags map(string) n/a yes
use_private_net Use private network injection bool false no
worker_count Number of workers number null no

Outputs

Name Description
id Function app ID
identity Function app Managed Identity
outbound_ip_address_list Function app outbound IP address list
primary_key Function app primary key

License

Apache 2 Licensed. For more information please see LICENSE