Azure / Azure/azure-cli

az containerapp create fails with --bind parameter

Open
#30,001 8 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign bug ContainerApp customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

run
az containerapp create \
--name myapp \
--image mcr.microsoft.com/k8se/samples/sample-service-redis:latest \
--ingress external \
--target-port 8080 \
--bind myredis \
--environment "$ENVIRONEMNT" \
--resource-group "$RESOURCE_GROUP" \
--query properties.configuration.ingress.fqdn

fails with:
unrecognized arguments: --bind

### Related command

az containerapp create

### Errors

fails with:
unrecognized arguments: --bind

### Issue script & Debug output

cli.knack.cli: Command arguments: ['containerapp', 'create', '--name', 'myapp', '--image', 'mcr.microsoft.com/k8se/samples/sample-service-redis:latest', '--ingress', 'external', '--target-port', '8080', '--bind', 'redis-addon-10d318b4-b20a', '--environment', 'Validator-Dashboard-Dev', '--resource-group', 'dariuspoc', '--query', 'properties.configuration.ingress.fqdn', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'containerapp': ['azure.cli.command_modules.containerapp', 'azure.cli.command_modules.serviceconnector']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: containerapp 0.231 37 123
cli.azure.cli.core: serviceconnector 0.020 20 309
cli.azure.cli.core: Total (2) 0.251 57 432
cli.azure.cli.core: Loaded 56 groups, 432 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : containerapp create
cli.azure.cli.core: Command table: containerapp create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/daribzow/.azure/commands/2024-09-30.10-39-03.containerapp_create.66865.log'.
az_command_data_logger: command args: containerapp create --name {} --image {} --ingress {} --target-port {} --bind {} --environment {} --resource-group {} --query {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x101bdcf40>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x101bdcfe0>, .add_cache_arguments at 0x101bdd120>, .update_breaking_change_info at 0x101bdd1c0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.azure.cli.core.command_recommender: "--bind" is an invalid parameter for command "containerapp create".
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
cli.azure.cli.core.command_recommender: Recommendation requests.get() exception: HTTPSConnectionPool(host='app.aladdin.microsoft.com', port=443): Max retries exceeded with url: /api/v1.0/suggestions?query=%7B%22command%22%3A+%22containerapp+create%22%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.64.0%22%2C+%22errorType%22%3A+%22UnrecognizedArguments%22%2C+%22correlationId%22%3A+%2210d622e0-6630-4fd9-915c-b285082cb81a%22%2C+%22subscriptionId%22%3A+%2222e54c1d-40df-42a1-9b64-4c0bbe913df5%22%2C+%22eventId%22%3A+%2226854d5d-a41d-469e-98b3-e62f60fef440%22%7D (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
cli.azure.cli.core.command_recommender: "--bind" is an invalid parameter for command "containerapp create".
cli.azure.cli.core.azclierror: NoneType: None

cli.azure.cli.core.azclierror: unrecognized arguments: --bind redis-addon-10d318b4-b20a
az_command_data_logger: unrecognized arguments: --bind redis-addon-10d318b4-b20a

### Expected behavior

container app bind to redis

### Environment Summary

azure-cli 2.64.0

core 2.64.0
telemetry 1.1.0

Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1

Python location '/usr/local/Cellar/azure-cli/2.64.0/libexec/bin/python'
Extensions directory '/Users/xyz/.azure/cliextensions'

Python (Darwin) 3.11.10 (main, Sep 7 2024, 01:03:31) [Clang 15.0.0 (clang-1500.3.9.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

### 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.