azurerm_linux_function_app

Manages a Linux Function App.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "linuxfunctionappsa"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_service_plan" "example" {
  name                = "example-app-service-plan"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  os_type             = "Linux"
  sku_name            = "Y1"
}

resource "azurerm_linux_function_app" "example" {
  name                = "example-linux-function-app"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location

  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key
  service_plan_id            = azurerm_service_plan.example.id

  site_config {}
}

Arguments Reference

The following arguments are supported:



An active_directory block supports the following:


A application_stack block supports the following:


An app_service_logs block supports the following:


An auth_settings block supports the following:


An auth_settings_v2 block supports the following:


An apple_v2 block supports the following:


An active_directory_v2 block supports the following:


An azure_static_web_app_v2 block supports the following:


A custom_oidc_v2 block supports the following:


A facebook_v2 block supports the following:


A github_v2 block supports the following:


A google_v2 block supports the following:


A microsoft_v2 block supports the following:


A twitter_v2 block supports the following:


A login block supports the following:


A backup block supports the following:


A connection_string block supports the following:


A cors block supports the following:


A docker block supports the following:


A facebook block supports the following:


A github block supports the following:


A google block supports the following:


A headers block supports the following:


An identity block supports the following:


An ip_restriction block supports the following:


A microsoft block supports the following:


A schedule block supports the following:


A scm_ip_restriction block supports the following:


A site_config block supports the following:


A sticky_settings block supports the following:


A storage_account block supports the following:


A twitter block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:


An identity block exports the following:


A site_credential block exports the following:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Linux Function Apps can be imported using the resource id, e.g.

terraform import azurerm_linux_function_app.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1