I have created a new App Service Environment Version 3 and a App service using Terraform:
resource "azurerm_app_service_environment_v3" "example" {
name = "example-asev3"
resource_group_name = azurerm_resource_group.example.name
subnet_id = azurerm_subnet.example.id
internal_load_balancing_mode = "Web, Publishing"
cluster_setting {
name = "DisableTls1.0"
value = "1"
}
cluster_setting {
name = "InternalEncryption"
value = "true"
}
cluster_setting {
name = "FrontEndSSLCipherSuiteOrder"
value = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
}
tags = {
env = "production"
terraformed = "true"
}
}
resource "azurerm_service_plan" "example" {
name = "example"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
os_type = "Linux"
sku_name = "I1v2"
app_service_environment_id = azurerm_app_service_environment_v3.example.id
}
resource "azurerm_application_insights" "example" {
name = "tf-test-appinsights"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
application_type = "web"
}
resource "azurerm_app_service" "example" {
name = "example-app-service"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
site_config {
linux_fx_version = "DOTNETCORE:6.0"
always_on = true
}
}
I have created a sample visual studio app using visual studio and directly deployed to it. It is throwing Error when I try to access the app service portal.
When I access the application from local host after deploying, its working fine. Not sure what configuration is wrong in App Service.

Did you create the private dns zones and its records?