Skip to content

Commit

Permalink
Use vscode authentication instead of Azure Account extension (#15403)
Browse files Browse the repository at this point in the history
Fixes [14101](#14101)

NOTE: I plan on not merging this until the current release ships, so we
have some time to dogfood internally before the December release.

Fixes #14101 
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/15403)

- [x] Check if documentation needs to change
- [x]
https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-vscode
    - entered  #15450
  - [x] Clouds
- [x] Wait for multiple-account issue to be fixed (see below)?
  - Entered #15453
- [x] Check #8714 
- [ ] Add to readme notes
  - UI changes below
  - Multiple F1 commands if Azure Account extension still installed
  - Multiple accounts issue if still a problem

Overview of UI changes (images from
https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-vscode)

> <img width="732" alt="image"
src="https://github.com/user-attachments/assets/22dd96cb-2300-4047-a0be-dbb189b99f19">
NEW: You never see this menu now. Instead, if you aren't logged in,
you'll see something like this:
<img width="374" alt="image"
src="https://github.com/user-attachments/assets/92b35128-67e3-4e8e-b472-7aea0c1d52b7">

> <img width="782" alt="image"
src="https://github.com/user-attachments/assets/fef8c2d9-1060-4c1b-9fa4-1ed26c23db65">
NEW: Bicep no longer uses the Azure Account extension (it's being
deprecated). Instead, it uses new built-in vscode functionality that is
integrated with vscode's UI, e.g.:
<img width="655" alt="image"
src="https://github.com/user-attachments/assets/579b96b1-ee35-4502-8403-2196081a6d77">
and also integrates with other extensions like the Azure Resources
extension.

The statement that deployment doesn't use values from the
bicepconfig.json is correct. Instead, if you need to sign in to a custom
cloud, use this vscode setting before signing in:
<img width="1254" alt="image"
src="https://github.com/user-attachments/assets/cecb5371-767c-4d1c-8fdf-4fdd0154d04a">

Note: multiple signed-in accounts isn't currently supported (you may
need to sign out of one first using the vscode UI above), although
hopefully that will be fixed soon, perhaps even before this feature
change ships.

---------

Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
  • Loading branch information
StephenWeatherford authored Nov 15, 2024
1 parent 4b190e2 commit f507ed0
Show file tree
Hide file tree
Showing 20 changed files with 9,302 additions and 6,293 deletions.
22 changes: 17 additions & 5 deletions src/Bicep.LangServer/LangServerResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/Bicep.LangServer/LangServerResources.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -169,6 +169,6 @@
<value>Unsupported target scope: {0}.</value>
</data>
<data name="ViewDeploymentInPortalMessage" xml:space="preserve">
<value>View deployment in portal: {0}.</value>
<value>Open deployment in portal: {0}.</value>
</data>
</root>
</root>
Loading

0 comments on commit f507ed0

Please sign in to comment.