Terraform - configuring function app to use existing ASE



It is something hard to get the settings rights for terraform, if you don't run it multiple times.
In this example, i had so much errors and i found out that, if you referencing an existing ASE plan, you better make sure it matches - in terms of TIER and SIZE. Otherwise your service plan is as good as no service plan





\resource "azurerm_app_service_plan" "ase-service-plan" {
name = "${var.environment}${var.service_plan_name}"
resource_group_name = "${azurerm_resource_group.azure-rg.name}"
location = "${var.location}"
kind = "FunctionApp"
app_service_environment_id = "/subscriptions/
your-subscription-id/
resourceGroups/yourResourceGroup/providers/Microsoft.Web/
hostingEnvironments/your-ASE-name"
maximum_elastic_worker_count = 1
## required - Isolated ASEV2 ## Best to match this
sku {
tier = "Isolated"
size = "I1"
capacity = 1
}
}


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm