Azure / Azure/azure-cli

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

Open
#28,559 2 comments 0 reactions 4 assignees Claimed by @kamperiadis View on GitHub
act-observability-squad Auto-Assign bug Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.