Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@nt-7
Copy link
Contributor

@nt-7 nt-7 commented Apr 16, 2020

Description

"az group deployment" command is deprecated in the most recent version of the azure cli.
This will replace it with the new "az deployment group" command.

So, it should fix from deprecated "az group deployment" to new "az deployment group" in create.ps1.

Results (Screenshots)

  • Before
    image

Creating resource group ...
Validating Azure deployment ...
This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.
Deploying Azure services (this could take a while)...
This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

  • After
    image

Creating resource group ...
Validating Azure deployment ...
Deploying Azure services (this could take a while)...

Reference

fix: use deployment group instead of group deployment
microsoft/accessibility-insights-service#662

refs #2687

Fix az deployment group in create.ps1
@a-b-r-o-w-n a-b-r-o-w-n self-assigned this Apr 16, 2020
@a-b-r-o-w-n
Copy link
Contributor

Thanks for the PR!

This command is not in the az cli in the version I have installed (2.0.80). I'm not sure the last time I updated, but it has me thinking that we should do 1 of 2 things:

  1. Do a version check and invoke the appropriate command.
  2. Prompt users to update to a newer version of the cli.

@boydc2014 @luhan2017 do you have any thoughts?

@a-b-r-o-w-n a-b-r-o-w-n linked an issue Apr 16, 2020 that may be closed by this pull request
@nt-7
Copy link
Contributor Author

nt-7 commented Apr 17, 2020

@a-b-r-o-w-n thanks for your comment and posting the issue.
Just in case, my Azure CLI version is 2.3.1 using "az --version".

@boydc2014
Copy link
Contributor

boydc2014 commented Apr 21, 2020

Thanks for the PR!

This command is not in the az cli in the version I have installed (2.0.80). I'm not sure the last time I updated, but it has me thinking that we should do 1 of 2 things:

  1. Do a version check and invoke the appropriate command.
  2. Prompt users to update to a newer version of the cli.

@boydc2014 @luhan2017 do you have any thoughts?

I will vote for 2, supporting one approach which is the latest looks good enough to me.

And thanks @nt-7 , will you be able to add a version guard at top to prompt user to update az-cli, if the version is below certain version?

# Deploy Azure services
Write-Host "> Validating Azure deployment ..."
$validation = az group deployment validate `
$validation = az deployment group validate `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a version guard on top of the file? maybe pick the version az-cli switch to this new syntax? @zidaneymar any suggestions on the version here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boydc2014 thanks for your reply!

As follows, it seems that az CLI version (az--version) cannot be parsed programmatically...
Azure/azure-cli#11425

Meanwhile, we can get the version programmatically with the following new features, az version command. However, it is still a preview feature.
Azure/azure-cli#11680

Do you have any good suggestions about this?

@a-b-r-o-w-n a-b-r-o-w-n removed their assignment Apr 21, 2020
@a-b-r-o-w-n
Copy link
Contributor

@nt-7 we have deprecated the powershell script in favor of a cross-platform friendly node script. Thanks for the PR and for bringing this to our attention.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update to latest azure cli api

3 participants