-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Describe the bug
I'm attempting to use the command as documented at https://learn.microsoft.com/en-us/azure/container-apps/storage-mounts?tabs=smb&pivots=azure-cli
Related command
az containerapp env storage set
Errors
> az containerapp env storage set \
--name "${environment_name}" \
--resource-group "${rg_name}" \
--storage-name aifsfileshare \
--storage-type AzureFile \
--azure-file-account-name "${storage_account_name}" \
--azure-file-share-name "${storage_fileshare_name}" \
--access-mode ReadWrite \
--storage-account-key "$key"
unrecognized arguments: --storage-type AzureFile
Issue script & Debug output
cli.knack.cli: Command arguments: ['containerapp', 'env', 'storage', 'set', '--debug', '--name', 'gpu-env', '--resource-group', 'rg-aifs-test-gpu', '--storage-name', 'aifsfileshare', '--azure-file-account-name', '', '--azure-file-share-name', 'aifsfileshare', '--access-mode', 'ReadWrite', '--storage-account-key', '', '--storage-type', 'AzureFile']
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 0x795a5ac0ff60>, <function OutputProducer.on_global_arguments at 0x795a5abba160>, <function CLIQuery.on_global_arguments at 0x795a5abfbc40>]
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.127 37 123
cli.azure.cli.core: serviceconnector 0.011 20 309
cli.azure.cli.core: Total (2) 0.138 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 env storage set
cli.azure.cli.core: Command table: containerapp env storage set
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x795a59e05d00>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/larsfp/.azure/commands/2025-01-14.11-23-45.containerapp_env_storage_set.3032642.log'.
az_command_data_logger: command args: containerapp env storage set --debug --name {} --resource-group {} --storage-name {} --azure-file-account-name {} --azure-file-share-name {} --access-mode {} --storage-account-key {} --storage-type {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x795a59e444a0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x795a59e5a3e0>, <function register_cache_arguments..add_cache_arguments at 0x795a59e5a520>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x795a59e5a5c0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.azure.cli.core.command_recommender: "--storage-type" is an invalid parameter for command "containerapp env storage set".
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22containerapp+env+storage+set%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+%221d28921a-a9d7-499f-a219-a540945fe770%22%2C+%22subscriptionId%22%3A+%226159ee6a-0622-49ef-bc4d-0d54af29d0df%22%2C+%22eventId%22%3A+%22b7d7df4e-e4c2-437c-aa7f-c6664ebc0c0f%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.command_recommender: "--storage-type" is an invalid parameter for command "containerapp env storage set".
cli.azure.cli.core.azclierror: NoneType: None
cli.azure.cli.core.azclierror: unrecognized arguments: --storage-type AzureFile
az_command_data_logger: unrecognized arguments: --storage-type AzureFile
Examples from AI knowledge base:
https://aka.ms/cli_ref
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x795a59e05f80>]
az_command_data_logger: exit code: 2
cli.main: Command ran in 0.375 seconds (init: 0.067, invoke: 0.308)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3861 in cache file under /home/larsfp/.azure/telemetry/20250114112346049
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/init.py /home/larsfp/.azure /home/larsfp/.azure/telemetry/20250114112346049"
telemetry.process: Return from creating process 3032683
telemetry.main: Finish creating telemetry upload process.
Expected behavior
No errors.
Environment Summary
az --version
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 '/opt/az/bin/python3'
Extensions directory '/home/larsfp/.azure/cliextensions'
Python (Linux) 3.11.8 (main, Aug 28 2024, 05:45:18) [GCC 11.4.0]
Legal docs and information: aka.ms/AzureCliLegal
You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
Additional context
No response