terraform/ecc-azure-454-11_last_powershell_funcapp/red/function_app.tf (45 lines of code) (raw):

resource "azurerm_service_plan" "this" { name = "sp-${var.prefix}-red" location = azurerm_resource_group.this.location resource_group_name = azurerm_resource_group.this.name os_type = "Linux" sku_name = "B1" tags = var.tags } resource "azurerm_storage_account" "this" { name = "sa${var.prefix}red" resource_group_name = azurerm_resource_group.this.name location = azurerm_resource_group.this.location account_tier = "Standard" account_replication_type = "LRS" allow_nested_items_to_be_public = false tags = var.tags } resource "azurerm_linux_function_app" "this" { name = "functions${var.prefix}linux-red" location = azurerm_resource_group.this.location resource_group_name = azurerm_resource_group.this.name service_plan_id = azurerm_service_plan.this.id storage_account_name = azurerm_storage_account.this.name storage_account_access_key = azurerm_storage_account.this.primary_access_key site_config { application_stack { powershell_core_version = 7.2 } } tags = var.tags } resource "azurerm_windows_function_app" "this" { name = "functions${var.prefix}windows-red" location = azurerm_resource_group.this.location resource_group_name = azurerm_resource_group.this.name service_plan_id = azurerm_service_plan.this.id storage_account_name = azurerm_storage_account.this.name storage_account_access_key = azurerm_storage_account.this.primary_access_key site_config { application_stack { powershell_core_version = 7.2 } } tags = var.tags }