Azure / Azure/Azure-Functions

Azure Keyvault secret reference for application insight not resolving within Azure Function via environment variable.

Open
#2,663 0 comments 1 reaction 0 assignees View on GitHub
v4-bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

I provided the Azure Application Insights connection string as a Key Vault reference through the environment variable named `APPLICATIONINSIGHTS_CONNECTION_STRING`. The setup is able to connect to the Key Vault, as shown in the image below.

Image

However, there is still one issue: although everything is being logged in the Application Insights log tab of the Azure Function, it continues to provide an option to configure Application Insights, even though it is already configured.

Image

Image

As a workaround after Terraform deployment, I have to provide the Application Insights connection string in plain text. After it shows it's connected with Application Insights, then again, I reference the Key Vault, and everything works as expected.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the Azure Function configuration for the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable and the Terraform deployment that creates the Key Vault reference. Verify why Application Insights still appears unconfigured when logs are present; done means the Key Vault reference is recognized without temporarily supplying the connection string in plain text.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, terraform
Domain
cloud, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.