Open serbrech opened 1 year ago
Thank you for opening this issue, we will look into it.
Similar feature request with https://github.com/Azure/azure-cli/issues/21888
@jsntcy you're sure you linked the right issue? It seems completely different to me?
@jsntcy Yu Chen FTE you're sure you linked the right issue? It seems completely different to me?
Sorry, updated the issue link.
Yep, that's exactly the same. Our current use case is that we have a resource model that can get pretty large, and the portal page will provide a much clearer visualization.
In general, I feel like making the --output
parameter extensible per resource would also be useful.
Currently, it's validated and anything unknown by the root az command will be rejected.
Our resource cli is built as an extension, so we will add a --portal
option that will open the browser.
This feature request is a framework level change and we'll have a design and discuss it in May. Once the design is finalized, we'll start development work (probably in July).
Hi @serbrech, today we discussed this feature inside Azure CLI team and had another alternative solution to meet the requirements of the customer (Customer can easily discover the resource url in Azure Portal in command window). Now we have two solutions below:
Solution 1: Display a message (“You can open the resource in Azure Portal with the url: https://portal.azure.com/#@{tentant_id}/resource/{resource_id}”) in command window after a command is executed successfully; then the customer can copy the url above to the browser to view the resource in Azure Portal easily.
Pros:
High discoverability: The customer can easily discover the resource url in Azure Portal displayed in command window without providing the new format portal
for --output
argument in command.
Technical feasibility: It’s easy to implement because the resource url in Azure Portal will be displayed in command window as long as the output of the command contains the resource id.
Cons:
Solution 2:
Add a new format portal
for the --output
argument for all commands.
Pros:
Cons:
Low discoverability: The customer needs to provide the new format portal
to the --output
argument for each command in order to open the resource in Azure Portal as usually it’s not easy for the customer to discover a new output format.
Technical feasibility: It’s very difficult to decide which command should support the new format portal
for the --output
argument one by one from technical perspective as there are thousands of commands with different implementations.
Appreciate you can share your thoughts about the two solutions. (We prefer Solution 1 based on their pros and cons.)
add a --output option to open the resource in the portal.
example:
az group --name my-group -o portal
-> open the browser at the resource group urlaz deployment create ... -o portal
-> open the portal showing the deployment progress