`az functionapp keys set` throws 'Not Found'
Describe the bug
Possibly related issue: Azure/Azure-Functions#2221
Command Name
az functionapp keys set
Errors:
Operation returned an invalid status 'Not Found'
az functionapp show --name {} --resource-group {} with the same parameter values works as expected.
To Reproduce:
- Linux Function App v4.
- Configured to pull container image from Azure Container Registry using managed identity.
-
az functionapp keys set --key-type masterKey --name {} --resource-group {} --key-name "_master"
Expected Behavior
A key named _master with a generated value was created and assigned to the function app.
Environment Summary
Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04 LTS
Python 3.6.10
Installer: DEB
azure-cli 2.31.0
Extensions:
aks-preview 0.5.49
Additional Context
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably, @fabiocav.
Issue Details
Describe the bug
Possibly related issue: Azure/Azure-Functions#2221
Command Name
az functionapp keys set
Errors:
Operation returned an invalid status 'Not Found'
az functionapp show --name {} --resource-group {} with the same parameter values works as expected.
To Reproduce:
- Linux Function App v4.
- Configured to pull container image from Azure Container Registry using managed identity.
-
az functionapp keys set --key-type masterKey --name {} --resource-group {} --key-name "_master"
Expected Behavior
A key named _master with a generated value was created and assigned to the function app.
Environment Summary
Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04 LTS
Python 3.6.10
Installer: DEB
azure-cli 2.31.0
Extensions:
aks-preview 0.5.49
Additional Context
| Author: | kimjamia |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
route to service team
It may be the storage endpoint suffix you're using in the initial deployment of the function app, if youre function app has its own storage account. In a test environment, we had core.windows.net hardcoded but then had an issue going to another environment, and the "404" for a function key update was referring to an internal error finding the container azure-webjobs-secrets.
We get the same error 'Not Found' when we try to set the masterKey via azure cli.
This does not work and returns Operation returned an invalid status 'Not Found'
az functionapp keys set -g 'RG' -n 'FNAPP' --key-type masterKey --key-name '_master' --key-value 'MYKEY'
Turns out, to set the masterKey you have to set it with the type functionKeys. So this does work:
az functionapp keys set -g 'RG' -n 'FNAPP' --key-type functionKeys --key-name '_master' --key-value 'MYKEY'
Seems wrong to me...