bicep icon indicating copy to clipboard operation
bicep copied to clipboard

Insert Resource should first check for Visual Studio credentials

Open ucheNkadiCode opened this issue 2 years ago • 3 comments

Similar to our Right click deploy feature, We want to eliminate our reliance on the Azure CLI as a user is using the Bicep extension. This helps in plenty of remote scenarios.

So we will check for visual studio first and prompt them to download the Azure account extension and sign in using it.

We can reuse the same popup when they try this command and we find no credentials.

ucheNkadiCode avatar Apr 14 '22 00:04 ucheNkadiCode

I'm not convinced using VS Code auth is always the right choice/required. Seems like CLI auth is convenient if it's a tool I already use and am signed into, no?

alex-frankel avatar Apr 14 '22 22:04 alex-frankel

According to telemetry, 85 percent of people that installed Bicep within 90 days ALSO installed the Az account extension within those 90 days. (I can send the query if interested) Not only is this a great way to play nice with the ecosystem of Azure products, it again decreases our reliance on needing the Az CLI.

From my findings, it speaks to the fact that we can take the VS Code extension and make our default credential precedence start with VSCodeCredential. Obviously I want to run this by our Bicep team. If the user is not linked to an azure subscription in VS code then the very next option will be our extension would grab their AzCli credentials

What I want is, if they have NOTHING installed, we will prompt them to install the azure account extension as soon as they try to run a bicep command that talks to azure (insert resource, deploy)

ucheNkadiCode avatar Apr 15 '22 19:04 ucheNkadiCode

Need to confirm the behavior Uche is describing.

Need to also consider whether deploy should only support az account extension creds.

alex-frankel avatar Apr 27 '22 19:04 alex-frankel