Azure / Azure/Azure-Functions

The portal is not able to confirm the status of your Key Vault reference at this time. Linux App Service Plan.

Open
#2,248 31 comments 8 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Azure Keyvault secret reference not resolving within Azure Linux Function connection string.

We are using this terraform module: [azurerm_linux_function_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app)

When we try to add a reference to a key in the vault the following error appears:

_"The portal is not able to confirm the status of your Key Vault reference at this time. Please confirm the status directly from the app by checking whether the environment variables have resolved.[ Click here to access the app.](https://afcazewdmlns101inenm.scm.azurewebsites.net/)"_

I have tried to move the function to the same Resource Group as the keyvault it do not make any difference.

I destroyed the Linux Function and replaced it with [azurerm_windows_function_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_function_app) and it worked as expected.

An alternative but not wanted solution that worked is that I changed the App Service Plan from Dynamic to a Shared plan and it works. It does not work with Dynamic plan on Linux OS.

The same problem was reported here: [Azure Keyvault secret reference not resolving within Azure Function connection string](https://github.com/Azure/Azure-Functions/issues/1291) and it was closed but it seems the problem persists.

There is a recommended solution [key vault reference should now work in Linux consumption
](https://github.com/Azure/Azure-Functions/issues/1291#issuecomment-782563107) to use the new syntax as documented in the docs: [Use Key Vault references for App Service and Azure Functions/Reference syntax](https://docs.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli#reference-syntax). I tried both syntaxes both returned the same error on Dynamic plan Y1.

Function works perfectly fine on Functions Premium plan as well.

Let me know if you require any further information on this issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the azurerm_linux_function_app configuration and the Azure App Service Key Vault reference syntax linked in the report. Reproduce the connection-string reference on a Linux Dynamic Y1 plan, then compare it with Windows, Shared, and Premium configurations; done means the Key Vault reference resolves and the app environment variable contains the secret.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, linux, terraform
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.