Azure PowerShell: For `New-AzGalleryImageDefinition`, `'TrustedLaunch'` and `'TrustedLaunchSupported'` aren't synonyms
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
I tried to take advantage of https://github.com/Azure/azure-powershell/pull/24869 in Azure PowerShell 12.0.0 by changing
to omit -Feature @(@{ Name = 'SecurityType'; Value = 'TrustedLaunch'; }) and -HyperVGeneration 'V2'. This caused the following command
to fail with
New-AzGalleryImageVersion: C:\GitHub\STL\azure-devops\create-1es-hosted-pool.ps1:279
Line |
279 | $ImageVersion = New-AzGalleryImageVersion `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The security type 'TrustedLaunchSupported' is not supported for the source id ''. Currently only Vhd Blob, User
| Image and Gallery Image Version sources are supported for 'TrustedLaunchSupported' images. ErrorCode:
| InvalidParameter ErrorMessage: The security type 'TrustedLaunchSupported' is not supported for the source id ''.
| Currently only Vhd Blob, User Image and Gallery Image Version sources are supported for 'TrustedLaunchSupported'
| images. ErrorTarget: galleryImageVersion.properties.storageProfile.osDiskImage.source.id StatusCode: 400
| ReasonPhrase: Bad Request OperationID : 352dcb67-3fe5-4a4b-98ba-640efe5ecd0f
It appears that the new default of 'TrustedLaunchSupported' is not a synonym for 'TrustedLaunch'.
We should report this upstream, but we'll need to distill our script into a self-contained repro. I'm a lazy kitty, so I'll do this later. 🐈
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with azure-devops/create-1es-hosted-pool.ps1 around the referenced lines 294-317 and reproduce the failure using New-AzGalleryImageDefinition and New-AzGalleryImageVersion. Distill the existing script into a self-contained reproduction that demonstrates the difference between TrustedLaunch and TrustedLaunchSupported, then report it upstream.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100