Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

az deployment mg create command does not support Complete deployment mode #26873

Open AmberYangY opened 1 year ago

AmberYangY commented 1 year ago

Describe the bug

From the following doc, az deployment mg create should support [--mode {Complete, Incremental}]. https://learn.microsoft.com/en-us/cli/azure/deployment/mg?view=azure-cli-latest#az-deployment-mg-create But I tested it from my side, the error message mentioned the deployment mode "complete" is not supported for the management group scope. image

Related command

az deployment mg create --location WestUS --management-group-id xxx --name xxx --template-file "xxx"

Errors

{"code": "InvalidDeployment", "message" : "Specified deployment mode 'Complete' is not supported for deployment at the current scope. Please see https://aka.ms/deployment-modes for usage details."}

Issue script & Debug output

az deployment mg create --location WestUS --management-group-id xxx --name xxx --template-file "xxx"

Expected behavior

The deployment should be handled with Complete mode.

Environment Summary

azure-cli 2.50.0

Additional context

No response

yonzhan commented 1 year ago

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

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @josephkwchan, @jennyhunter-msft.

Issue Details
### Describe the bug From the following doc, az deployment mg create should support [--mode {Complete, Incremental}]. https://learn.microsoft.com/en-us/cli/azure/deployment/mg?view=azure-cli-latest#az-deployment-mg-create But I tested it from my side, the error message mentioned the deployment mode "complete" is not supported for the management group scope. ![image](https://github.com/Azure/azure-cli/assets/94522598/4138e558-79f2-49ff-8790-75d0fd9f9993) ### Related command az deployment mg create --location WestUS --management-group-id xxx --name xxx --template-file "xxx" ### Errors {"code": "InvalidDeployment", "message" : "Specified deployment mode 'Complete' is not supported for deployment at the current scope. Please see https://aka.ms/deployment-modes for usage details."} ### Issue script & Debug output az deployment mg create --location WestUS --management-group-id xxx --name xxx --template-file "xxx" ### Expected behavior The deployment should be handled with Complete mode. ### Environment Summary azure-cli 2.50.0 ### Additional context _No response_
Author: AmberYangY
Assignees: zhoxing-ms
Labels: `bug`, `Service Attention`, `ARM`, `customer-reported`, `Auto-Assign`, `Azure CLI Team`
Milestone: Backlog
zhoxing-ms commented 1 year ago

Since this error message was returned by the REST service, it needs the ARM service team to see if the REST supports Complete mode. Please note that the relevant documentation doc link states that it is supported.

AmberYangY commented 1 year ago

Thanks for your reply.

May I know is it possible to transfer/merge this GitHub issue to the GitHub page managed by ARM team?

Since this error message was returned by the REST service, it needs the ARM service team to see if the REST supports Complete mode. Please note that the relevant documentation doc link states that it is supported.

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.

Issue Details
### Describe the bug From the following doc, az deployment mg create should support [--mode {Complete, Incremental}]. https://learn.microsoft.com/en-us/cli/azure/deployment/mg?view=azure-cli-latest#az-deployment-mg-create But I tested it from my side, the error message mentioned the deployment mode "complete" is not supported for the management group scope. ![image](https://github.com/Azure/azure-cli/assets/94522598/4138e558-79f2-49ff-8790-75d0fd9f9993) ### Related command az deployment mg create --location WestUS --management-group-id xxx --name xxx --template-file "xxx" ### Errors {"code": "InvalidDeployment", "message" : "Specified deployment mode 'Complete' is not supported for deployment at the current scope. Please see https://aka.ms/deployment-modes for usage details."} ### Issue script & Debug output az deployment mg create --location WestUS --management-group-id xxx --name xxx --template-file "xxx" ### Expected behavior The deployment should be handled with Complete mode. ### Environment Summary azure-cli 2.50.0 ### Additional context _No response_
Author: AmberYangY
Assignees: zhoxing-ms
Labels: `bug`, `Service Attention`, `ARM - Templates`, `customer-reported`, `Auto-Assign`, `Azure CLI Team`
Milestone: Backlog
alex-frankel commented 1 year ago

Complete mode is not a valid mode for non-RG scoped deployments. Is "Complete" a current valid enum for this property?

AmberYangY commented 1 year ago

@alex-frankel Hi Alex, may I know will you help to raise any work item to update the REST API doc with the correct swagger spec?

alex-frankel commented 1 year ago

https://msazure.visualstudio.com/One/_workitems/edit/24640447

Does this work item need to be finished in order to resolve this CLI issue? I don't believe these CLI commands are auto-generated. If that is the case, someone will need to create the PR on the CLI side, is that right?

anthony-c-martin commented 1 year ago

@zhoxing-ms since the root cause of this is a swagger inaccuracy, please could you move this to https://github.com/Azure/azure-rest-api-specs?

zhoxing-ms commented 1 year ago

since the root cause of this is a swagger inaccuracy, please could you move this to https://github.com/Azure/azure-rest-api-specs?

@anthony-c-martin Sorry, our team is not responsible for this repo. Could you please directly create a new issue on that repo and copy the content of this issue to it?

nintendoMan commented 10 months ago

This is still broken -> ERROR: {"code": "InvalidDeployment", "message": "Specified deployment mode 'Complete' is not supported for deployment at the current scope. Please see https://aka.ms/deployment-modes for usage details."}

[error]Script failed with exit code: 1