diff --git a/functions/Check.cs b/functions/Check.cs index 939f0bc..c2c15ff 100644 --- a/functions/Check.cs +++ b/functions/Check.cs @@ -19,7 +19,7 @@ public static async Task Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { - string host = Environment.GetEnvironmentVariable("StorageBlobHost"); + string host = Environment.GetEnvironmentVariable("TargetHost"); IPAddress[] addresses = Dns.GetHostAddresses(host); string responseMessage = JObject.FromObject(new { diff --git a/terraform/modules/access_via_private_endpoint/function.tf b/terraform/modules/access_via_private_endpoint/function.tf index 15cf525..763b531 100644 --- a/terraform/modules/access_via_private_endpoint/function.tf +++ b/terraform/modules/access_via_private_endpoint/function.tf @@ -37,6 +37,7 @@ resource "azurerm_function_app" "main" { WEBSITE_DNS_SERVER = "168.63.129.16" WEBSITE_RUN_FROM_PACKAGE = var.function_package_url CosmosDBConnection = azurerm_cosmosdb_account.main.connection_strings[0] + TargetHost = azurerm_storage_account.main.endpoint } depends_on = [ diff --git a/terraform/modules/private_endpoint/main.tf b/terraform/modules/private_endpoint/main.tf index d1ddf58..0092504 100644 --- a/terraform/modules/private_endpoint/main.tf +++ b/terraform/modules/private_endpoint/main.tf @@ -79,7 +79,7 @@ resource "azurerm_function_app" "main" { WEBSITE_VNET_ROUTE_ALL = 1 WEBSITE_DNS_SERVER = "168.63.129.16" WEBSITE_RUN_FROM_PACKAGE = var.function_package_url - StorageBlobHost = azurerm_storage_account.for_func.primary_blob_host + TargetHost = azurerm_storage_account.for_func.primary_blob_host } depends_on = [ diff --git a/terraform/modules/service_endpoint/main.tf b/terraform/modules/service_endpoint/main.tf index 000a3bc..a16cc5d 100644 --- a/terraform/modules/service_endpoint/main.tf +++ b/terraform/modules/service_endpoint/main.tf @@ -69,7 +69,7 @@ resource "azurerm_function_app" "main" { FUNCTIONS_WORKER_RUNTIME = "dotnet" WEBSITE_VNET_ROUTE_ALL = 1 WEBSITE_RUN_FROM_PACKAGE = var.function_package_url - StorageBlobHost = azurerm_storage_account.for_func.primary_blob_host + TargetHost = azurerm_storage_account.for_func.primary_blob_host } } diff --git a/terraform/modules/service_endpoint_west_eu/main.tf b/terraform/modules/service_endpoint_west_eu/main.tf index 4ebbe84..61931e0 100644 --- a/terraform/modules/service_endpoint_west_eu/main.tf +++ b/terraform/modules/service_endpoint_west_eu/main.tf @@ -71,7 +71,7 @@ resource "azurerm_function_app" "main" { WEBSITE_VNET_ROUTE_ALL = 1 WEBSITE_CONTENTOVERVNET = 1 WEBSITE_RUN_FROM_PACKAGE = var.function_package_url - StorageBlobHost = azurerm_storage_account.for_func.primary_blob_host + TargetHost = azurerm_storage_account.for_func.primary_blob_host } depends_on = [