Az.Compute: Add managed identity support to Gallery cmdlets#29264
Draft
Az.Compute: Add managed identity support to Gallery cmdlets#29264
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
…dlets Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Az.Compute cmdlets for managing compute gallery with managed identity
Az.Compute: Add managed identity support to Gallery cmdlets
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
EnableSystemAssignedIdentityandUserAssignedIdentityparameters toNew-AzGalleryandUpdate-AzGallery, and exposesIdentityin theGet-AzGalleryoutput object.Changes
PSGallery.cs— AddedIdentityproperty (GalleryIdentity); AutoMapper picks it up automatically from the SDK modelGalleryCreateOrUpdateMethod.csNew-AzGallery/Update-AzGallery: new parameters-EnableSystemAssignedIdentity(SwitchParameter) and-UserAssignedIdentity(string[])SystemAssigned,UserAssigned, orSystemAssigned, UserAssignedUpdate-AzGallery:GalleriesClient.CreateOrUpdate()return value was discarded, causing the cmdlet to output an empty gallery object on non-sharing updatesNew-AzGallery.md,Update-AzGallery.md) — Updated syntax blocks and added identity examplesTest-GalleryWithSystemAssignedIdentityandTest-UpdateGalleryWithSystemAssignedIdentityscenario testsUsage
Parameter naming follows the repo's managed identity best practices.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1n8vsblobprodwus2184.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)6yfvsblobprodwus2121.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)7t8vsblobprodwus2168.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)84hvsblobprodwus2148.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)8wdvsblobprodwus2137.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)9yyvsblobprodwus2157.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)b53vsblobprodwus2154.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)ba0vsblobprodwus2130.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)balvsblobprodwus2129.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)cbvvsblobprodwus2131.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)cffvsblobprodwus218.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)d94vsblobprodwus2119.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)ezcvsblobprodwus2170.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)faxvsblobprodwus2122.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)g3xvsblobprodwus2151.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)i01vsblobprodwus216.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)isvvsblobprodwus2147.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)jhgvsblobprodwus2167.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)k4pvsblobprodwus2140.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)mt2vsblobprodwus2110.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)nudvsblobprodwus214.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)p2tvsblobprodwus2189.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)tn2vsblobprodwus2124.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)wlnvsblobprodwus2188.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)x0dvsblobprodwus2111.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)y5lvsblobprodwus2179.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)zt8vsblobprodwus2176.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute.sln(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Az.Compute - Create, Update, Get, Az Compute Gallery with Managed Identity</issue_title>
<issue_description>
Guidelines
The purpose of the Azure PowerShell design review is to ensure that the cmdlets follow the same pattern across the Azure modules. An early design review reduces the risk of unnecessary implementation changes caused by a cmdlet syntax design change.
Please ensure your cmdlets comply with the design guidelines outlined in the PowerShell Design Guidelines document.
Please generate cmdlets syntax using
GenerateCmdletDesignMarkdown.ps1for review if your cmdlet is generated from API spec directly by Autorest.PowerShell.If you just add parameter to existing cmdlets and parameter definition complies with guideline, the design review is not expected.
Have you read above statement?
YESService Release Details
Is this an Embargoed Preview, A Public Preview, or a General Release?
General ReleaseWhat is the expected service release date?
2026-03-15Which Powershell module are these changes being made in?
Az.ComputeContact Information
Main developer contacts (emails + github aliases)
bhbrahma@microsoft.com @D1v38om83rPM contact (email + github alias)
Tanmay.Gore@microsoft.com @tanmaygoreOther people who should attend a design review (email)
Joseph.Calev@microsoft.comHigh Level Scenarios
Describe how your feature is intended to be used by customers.
New-AzGallerycommand should allow user to specify managed identities when creating an Azure Compute GalleryUpdate-AzGalleryshould accept the updated PSObject of type Microsoft.Compute/galleries with Managed Identity information and also allow user to specify managed identities.Get-AzGallerycommand should be able to fetch updated PSObject of type Microsoft.Compute/galleries with Managed Identity informationPiping scenarios / how these cmdlets are used with existing cmdlets
Sample of end-to-end usage
Please provide comprehensive examples that don't assume additional setup. It helps the audience understand your feature.
New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -SystemAssignedIdentity$uid1 = Get-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01; New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -UserAssignedIdentities $uid1$gallery = Get-AzGallery -ResourceGroupName $rgname -Name $galleryName; Update-AzGallery -inputObject gallery SystemAssignedIdentity$uid1 = Get-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01; $gallery = Get-AzGallery -ResourceGroupName $rgname -Name $galleryName; Update-AzGallery -inputObject $gallery -UserAssginedIdentities $uid1Syntax changes
Indicate if you are requesting an edit to existing cmdlets, adding new cmdlets, or both. Then edit the corresponding section below.
Changed cmdlet
List the names of the cmdlets that are being edited.
List the new parameters for the cmdlet, the parameter types, and their allowed values if applicable.
Please describe the new business logic of the cmdlet and paramet...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.