Make --cloud a global parameter for all commands
This feature request is similar to issue #5618 where a global --subscription parameter was added but request a global --cloud argument. I'm adapting that request and borrowing heavily from it's text.
The current CLI currently requires this workflow:
# set cloud
az cloud set --name <cloud_name>
# do az stuff in that sub
az acs login --name ...
This makes it very unfriendly and dangerous for scripts and interactive use.
Consider:
Long running script sets curernt sub to SubProduction, then does some azure commands. In the meantime user from the terminal, is thinking the commands execute against SubDev issues "delete resource group MyApp". OOPS. If we had --cloud as a global flag, we could have all scripts use that and not interfere with each other.
I'd like a solution where --cloud could be added as a global flag so multiple commands could be run from a machine to simultaneously deploy to multiple clouds/regions.
This is a valid ask. I suggest we can live with this though. Using multi clouds at the same time is rather rare; while it is way more mainline on using multiple subscriptions at the same time e.g. image reference, vnet peering, resource moving etc, hence we supported the "--subscription" based on the user asks.
@brichins thanks for reporting this though