Trying to use KeyVault Secret from Linux Python Azure Function. The problem is that the Function is not resolving the reference. I'm expecting the secret in the logs but it's printing the literal #Microsoft.Keyvault(...) instead.
Configuration
System Identity is enabled on the Azure Function.
This Identity has full access to the KeyVault.
The KV secret is mapped to the Function Configuration
I'm stalled with my development at this point. Any advice is greatly appreciated. Thank you!
Edit
Working with Azure support and managed to isolate the problem with Linux Functions with Consumption Plan. It works if using a Premium Plan.
It's a bug with Azure Functions Linux Apps. SecretUri does not resolve with a Consumption Plan, but works with a Premium Plan.
The workaround is to use #Microsoft.KeyVault(VaultName=[];SecretName[]) instead. This resolves properly with Consumption Plan. See this issue log for more information:
https://github.com/Azure/Azure-Functions/issues/2248
Related
I have a few Azure functions that process Service Bus messages. They seem to work just fine, messages are processed as expected.
However, all of these functions display a warning in Azure:
Storage is not configured properly, Function scaling will be limited.
Click to learn more.
The link leads to an article with advice to check that the storage account is running. I see it exists and has tables, blobs, and queues.
I have deployed my functions through ARM template with the following settings:
"FUNCTIONS_EXTENSION_VERSION": "~4",
"AzureWebJobsStorage": "[format(variables('kv_secrets'), 'AzureWebJobsStorage')]",
kv_secrets is a custom template variable that references Azure Key vault.
When looking in the deployed func configuration on Azure, it seems to be picked up just fine, no errors, storage account itself also works and functions work.
How to fix that warning? Is that Azure's mistake or will there be a real impact on my functions if I don't fix it?
I am using Terraform to deploy Azure Functions infrastructure through Azure DevOps release pipeline. Everything works fine but starting from last Friday, I got an error said Function runtime is unable to start. After some investigation, I found out the host.json file is not generated in the Azure Function. Any ideas on what's the potential fix for this?
(Only change is updated Function version v2 to v3, but even I downgrade back to v2, same problem still exists).
Environment:
Azure Function V2/V3
Resources Created By Terraform using App Service Plan Tier
Seems this is an internal issue. Rising a support ticket from the Azure portal will be a good way to find its reason.
I have a query regarding deploying the Azure function in the portal using the CLI.
I have created the storage account, resource group and created instance for the function app as well.
I created one normal azure http trigger function.
After that I have executed the command to deploy the Azure function using CLI. My command is executing without any issues but when I check the same in the portal changes are not reflecting.
Please help me to resolve the issue .
Thanks in advance.
Regards,
Manikanta
As already mentioned by George and Thomas.
Please make sure to meet the requirements, especially the project file struct.
https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#deployment-zip-file-requirements
After deployment , restart the app.
I have an Azure Service Bus Trigger that has been working both locally and in our Azure environment. Unfortunately, I had been deploying this to a consumption service plan, and I need it on a regular service plan. All deployments have been via Visua Studio.
No problem, right? I deployed the exact same code to a different service plan (in the same resource group) and it does not work. Messages are not being taken off of the queue.
At first I thought it was a connectivity or configuration issue, but then I noticed that the function isn't listed under "Functions."
I realize that the difference service plan itself isn't likely to be the cause, but I can't figure out what else has changed. I have also redeployed this code using the Consumption Plan and the trigger works perfectly.
Thanks for the advice.
I've just checked the debug console for both versions and there's obviously a lot missing from the one that isn't working. Bummer that VS said the deployment was successful. Btw, the bad version is "running." I guess I'll have to deploy again with some verbose output to see if that helps.
I am currently looking into using ARM to deploy new environments of our Azure Components. We have a lot of web apis that are deployed to Cloud Services, since we need access to the underlying OS to get CPU usage for App Dynamics metrics. When reading through ARM, it seems as if they are deprecating Cloud Services, but I have some confusion about what is replacing it. I see that you can create Web Apps using this and use Publish from Visual Studio to deploy the app it, but I see no options for Cloud Services. So what is the preferred method to do this? Creating a VM and deploying using Web Deploy? What about VM scaling. Any help would be greatly appreciated.
My company is in the process of moving a legacy app to Azure using Cloud Services and we were concerned about the future of Cloud Services. Since we are somewhat early into the project and would like to use the ARM model we thought it would be easier to make a move now if we knew the future. After a few conversations with project leads at Microsoft on this topic we were only told that we should continue working with Cloud Services as they would continue to be supported.
It's quite clear that the move to ARM was not well thought out in terms of direction and consequences of existing services that many people are already using. Reading between the lines I would say that there is no plan to convert Cloud Services from the ASM to ARM model.
If application insights (https://azure.microsoft.com/en-us/services/application-insights/) are sufficient for your monitoring needs, then you can use web apps. These can be deployed via ARM, and can automatically deploy from a git repo or web deploy package. See this example:
https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-github-deploy
The issue here that you may be trying to do operations which are restricted by the web app sandbox.
Failing that, you can use an ARM template to set up a VM and then invoke a custom site extension which will run powershell code to do further provisioning. This powershell code can fetch any package that you may want to install. See this ARM template for example: https://github.com/Azure/azure-quickstart-templates/tree/9ad72f1f5f0008c14311be79eee036b871712394/201-list-storage-keys-windows-vm
Once the VM is created you would be able to modify it and scale as needed.