Azure / azure-cli

Azure Command-Line Interface
MIT License
3.98k stars 2.96k forks source link

az containerapp create fails with --bind parameter #30001

Open dariusz-bzowka-chain-insight opened 5 hours ago

dariusz-bzowka-chain-insight commented 5 hours ago

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 [<function CLILogging.on_global_arguments at 0x1005b3ba0>, <function OutputProducer.on_global_arguments at 0x10077d1c0>, <function CLIQuery.on_global_arguments at 0x1007aae80>] 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 [<function AzCliLogging.init_command_file_logging at 0x101b6be20>] 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 [<function register_global_subscription_argument..add_subscription_parameter at 0x101bdcf40>] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x101bdcfe0>, <function register_cache_arguments..add_cache_arguments at 0x101bdd120>, <function register_upcoming_breaking_change_info..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('<urllib3.connection.HTTPSConnection object at 0x102cb5910>: 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

yonzhan commented 5 hours ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 5 hours ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @calvinsID.