Skip to content

Commit

Permalink
Update environment variable (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzeyelid authored Feb 19, 2021
1 parent 3835680 commit 6f43e9f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion functions/Check.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static async Task<IActionResult> 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 {
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/access_via_private_endpoint/function.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/private_endpoint/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/service_endpoint/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/service_endpoint_west_eu/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 6f43e9f

Please sign in to comment.