Azure / azure-cli

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

`--ampls-resource-id` is not available in `aks-preview` #29296

Closed JoeyC-Dev closed 3 weeks ago

JoeyC-Dev commented 3 months ago

Describe the bug

--ampls-resource-id is not available in aks-preview only.

Related command

az aks enable-addons -a monitoring --ampls-resource-id

Errors

unrecognized arguments: --ampls-resource-id

Issue script & Debug output

az extension add -n aks-preview
az aks enable-addons -a monitoring -n ${aks} -g ${rG} --workspace-resource-id ${logAnalyticsWorkspace_resId} --ampls-resource-id ${ampls} --debug`
...
cli.azure.cli.core.azclierror: unrecognized arguments: --ampls-resource-id 
az_command_data_logger: unrecognized arguments: --ampls-resource-id 

Expected behavior

This argument is available if not using aks-preview. Should add to aks-preview.

Environment Summary

{
  "azure-cli": "2.61.0",
  "azure-cli-core": "2.61.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {
    "ai-examples": "0.2.5",
    "aks-preview": "5.0.0b3",
    "ml": "2.26.1",
    "ssh": "2.0.3"
  }
}

Additional context

No response

yonzhan commented 3 months ago

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

orenzp commented 3 weeks ago

I got the same issue,

I run the following command and was able to use az aks enable-addons with --ampls-resource-id

az extension update --name aks-preview

FumingZhang commented 3 weeks ago

The option was added to aks-preview since 7.0.0b3 by PR #7754, and I would recommend you use version 7.0.0b4+ as there was a fix for this option by PR #7863.

Please upgrade the aks-preview you've installed.

  "extensions": {
    "ai-examples": "0.2.5",
    "aks-preview": "5.0.0b3",
    ...