microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.78k stars 8.34k forks source link

Feature Request: Multiple Cloud Shells for Multiple accounts #5311

Open mdlopresti opened 4 years ago

mdlopresti commented 4 years ago

I have multiple accounts into the same Azure Tenant, different accounts for different environments Dev/QA/etc, but I don't see a way of easily switching accounts in the same tenant. Is that something that could be added?

@DHowett note: this will also help with people who cannot log in for one or another reason but need to hardcode their tenant IDs

zadjii-msft commented 4 years ago

I think this is a good idea, but I'm not sure there's an easy way to do that currently. Maybe @DHowett-MSFT might have some ideas.

We definitely should support having multiple cloud shell profiles.

I like the idea of being able to provide additional arguments, parameters to them. This is a good idea. Thanks!

DHowett commented 4 years ago

I belong to multiple Azure tenancies / Azure ADs, and when I open a Cloud Shell profile it asks every time which one I want to log in to, like so:

Tenant 0: First Tenant (tenant1.com.au) Tenant 1: Second Tenant (tenant2.com.au) Please enter the desired tenant number. Enter n to login with a new account Enter r to remove the above saved connection settings. >

I think it would be great if I could specify the tenant in the profile (as defined in settings.json) so that I can open a Cloud Shell directly using wt or the new-tab UI and have it connect automatically to the Azure tenant that I want.

I would expect to be able to do something like this to skip the tenancy selection dialog:

{
    "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
    "hidden": false,
    "name": "Azure Cloud Shell (Tenant1)",
    "source": "Windows.Terminal.Azure",
    "tenant": "{my-first-azure-ad-tenant-guid-here}"
},
{
    "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
    "hidden": false,
    "name": "Azure Cloud Shell (Tenant2)",
    "source": "Windows.Terminal.Azure",
    "tenant": "{my-second-azure-ad-tenant-guid-here}"
}

(probably with different profile GUIDs though, I guess)

From @yaakov-h in #6018.

DHowett commented 4 years ago

I just had a wack idea: what if it could generate new dynamic profiles for each tenant you had logged in (!!)

zadjii-msft commented 4 years ago

I just had a wack idea: what if it could generate new dynamic profiles for each tenant you had logged in (!!)

tbh when we first spitballed the idea, that's what I'd imagine would happen. We just didn't really have dynamic profiles fleshed out as an idea yet, but maybe we could try that in v2?