Skip to content

Instantly share code, notes, and snippets.

@Beelzenef
Last active January 31, 2021 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Beelzenef/437673e991ecd544d4cd1e7cc54f1464 to your computer and use it in GitHub Desktop.
Save Beelzenef/437673e991ecd544d4cd1e7cc54f1464 to your computer and use it in GitHub Desktop.
provider "azurerm" {
version = "=2.40.0"
features {}
}
resource "azurerm_resource_group" "resgroup" {
name = "newfunctionapp-rg"
location = "West Europe"
}
resource "azurerm_storage_account" "yetanotherstorage" {
name = "xyzsaccountxyz"
resource_group_name = "${azurerm_resource_group.resgroup.name}"
location = "${azurerm_resource_group.resgroup.location}"
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_app_service_plan" "yetanotherplan" {
name = "azureserviceplannew"
location = "${azurerm_resource_group.resgroup.location}"
resource_group_name = "${azurerm_resource_group.resgroup.name}"
kind = "FunctionApp"
sku {
tier = "Dynamic"
size = "Y1"
}
}
resource "azurerm_function_app" "funcapp" {
name = "test-xyzcompany-functions"
location = "${azurerm_resource_group.resgroup.location}"
resource_group_name = "${azurerm_resource_group.resgroup.name}"
app_service_plan_id = "${azurerm_app_service_plan.yetanotherplan.id}"
storage_account_name = "${azurerm_storage_account.yetanotherstorage.name}"
storage_account_access_key = "${azurerm_storage_account.yetanotherstorage.primary_access_key}"
version = "~3"
app_settings = {
"FUNCTIONS_WORKER_RUNTIME" = "dotnet"
"FUNCTION_APP_EDIT_MODE" = "readonly"
"FUNCTIONS_EXTENSION_VERSION" : "~3",
"https_only" = true,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment