This terraform module deploys a Function App on consumption app service plan in Azure.
Installs following resources
- Storage account
- App service plan (Consumption)
- Function app
resource "azurerm_resource_group" "image_resizer" {
name = "image-resizer-func-rg"
location = "westeurope"
}
module "function_app" {
source = "innovationnorway/function-app-consumption/azurerm"
function_app_name = "image-resizer-func"
resource_group_name = "${azurerm_resource_group.image_resizer.name}"
location = "${azurerm_resource_group.image_resizer.location}"
environment = "lab"
function_verion = "beta"
release = "release 2018-07-21.001"
account_replication_type = "LRS"
app_settings {
"FUNCTIONS_WORKER_RUNTIME" = "dotnet"
}
tags {
a = "b",
project = "image-resizing"
}
}
The resource group where the resources should be created.
The azure datacenter location where the resources should be created.
The name for the function app. Without environment naming.
The Storage Account replication type. See azurerm_storage_account module for posible values. Defaults to "LRS"
Application settings to insert on creating the function app. Following updates will be ignored, and has to be set manually. Updates done on application deploy or in portal will not affect terraform state file.
A map of tags to add to all resources Defaults to "westeurope"
A map of tags to add to all resources. Release and Environment will be auto tagged.
The environment where the infrastructure is deployed.
The release the deploy is based on.
The runtime version the function app should have. Defaults to "beta"
The MSI identities set on the function app. Returns a list of identities.
The name of the storage account created for the function app.
The primary connection string to the storage account created for the function app.
The primary access key to the storage account created for the function app.