Skip to content

az functionapp create: needs more accurate error message and Help with regard to registry-server, registry-password, and registry-username when using Function App on Container App with private registry #28559

Open

Description

Describe the bug

When using the CLI to create a Function App on Container App that uses a private Azure Container Registry, if I don’t include --registry-server, --registry-password and --registry-username, the following error message occurs:

Usage error: --registry-server, --registry-password and --registry-username are required together if not using Azure Container Registry

These fields are all required when creating a Function App on Container App that uses a private registry (ACR or other), so a more accurate error message would be to the effect of the following:
Usage error: --registry-server, --registry-password and --registry-username are required together if you are using a private registry with a Function App on Container App

Furthermore, the Help for az functionapp create doesn’t indicate that --registry-server and --registry-username are required for private registries when using Function App on Container App, so it would be helpful to mention this requirement for these fields.
azfunctionappcreatehelp

Related command

az functionapp create

Errors

Usage error: --registry-server, --registry-password and --registry-username are required together if not using Azure Container Registry

Issue script & Debug output

az functionapp create --name MyFunctionApp --resource-group MyRG --max-replicas 1 --min-replicas 1 --storage-account MyStorageAccount --environment MyEnv --image MyACR.azurecr.io/azurefunctionsimage:v1.0.0 --registry-username MyACR --registry-password MyACRKey --registry-server MyACR.azurecr.io

Expected behavior

An error message such as the following:

Usage error: --registry-server, --registry-password and --registry-username are required together if you are using a private registry with a Function App on Container App

Environment Summary

azure-cli 2.58.0

core 2.58.0
telemetry 1.1.0

Extensions:
ai-examples 0.2.5
application-insights 0.1.19
connectedk8s 1.3.20
connection 0.1.0
containerapp 0.3.46
customlocation 0.1.3
db-up 0.2.7
k8s-extension 1.4.1
logicapp 0.1.1
ml 2.23.0
spring 1.13.1
ssh 2.0.2
webapp 0.4.0
workerapp 0.1.3

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Auto-AssignAuto assign by botFunctionsaz functionappService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions