Last active
January 31, 2021 09:49
-
-
Save Beelzenef/437673e991ecd544d4cd1e7cc54f1464 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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