Azure / Azure/azure-rest-api-specs

Trusted Launch SSE+CMK Azure Compute Gallery confusing error

Open
#29,280 1 comment 0 reactions 0 assignees View on GitHub
customer-reported Gallery Mgmt question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

### API Spec link

compute/galleryimageversions

### API Spec version

any that supports disk encryption set ids

### Question/Query

When trying to capture a Trusted Launch VM using dobule encryption to ACG I get a very long error with a stack trace, this happens on any API client to any galleryimageversions version.

```
$ az sig image-version create --resource-group jennatest \
--gallery-name test --gallery-image-definition testt \
--gallery-image-version 1.0.5 \
--virtual-machine {secret} \
--target-regions westus \
--target-region-encryption {double-encrypted-key} --location westus

Code: InternalOperationError
Message: Replication failed in this region due to 'Contract.Assert failed: Data model DiskEncryptionSetId '' does not match DiskRP returned DiskEncryptionSetId '/subscriptions/secret/resourceGroups/SHARED/providers/Microsoft.Compute/diskEncryptionSets/blah'

Call stack:
at Microsoft.Windows.Azure.GCM.Contract.Assert(Boolean condition, String userMessage) in X:\bt\1257000\repo\src\Shared\Lib\Common\Contracts.cs:line 82
at Microsoft.WindowsAzure.PlatformImageRepository.ArtifactService.GoalSeeking.ReplicationBlockBase`3.ValidateDiskRPEncryptionResult(Encryption dmEncryption, Encryption resultEncryption) in X:\bt\1253263\repo\src\CRP-PIR\ArtifactService\GoalSeeking\Blocks\ReplicationBlockBase.cs:line 357
at Microsoft.WindowsAzure.PlatformImageRepository.ArtifactService.GoalSeeking.AllocateSnapshotsBlock.ProcessSingleAllocateSnapshotResult(ReplicatedArtifact replicatedArtifact, VMImageSnapshotResult snapshotResult, Int32 maximumSourceDiskSizeInGb) in X:\bt\1253263\repo\src\CRP-PIR\ArtifactService\GoalSeeking\Blocks\AllocateSnapshotsBlock.cs:line 722
at
... (see github issue from Packer Azure plugin for full trace)
```

This was reported on a repo I maintain here https://github.com/hashicorp/packer-plugin-azure/issues/418 and originally here https://github.com/hashicorp/packer-plugin-azure/issues/304, the Packer Azure plugin invokes the API and runs into the same error.

The documentation for Trusted Launch and double encryption does not make it clear that this is not supported, however an [Azure engineer](https://github.com/hashicorp/packer-plugin-azure/issues/418#issuecomment-2138958901) who previously engaged on this issue let me know that the ACG product team says its not supported and there are no plans to support it. I've spent quite a bit of time trying to gather this information and understand that this just isn't supported on Azure.

**Can we please update this error message in the API to make it clearer that this functionality is not supported,** something simple like "Azure Compute Gallery does not support Trusted Launch images using Disk Encryption Sets" and document it. Users currently do not clearly know from reading the error and the Azure docs that ACG does not support this type of image.

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the Compute Gallery image-version API specification and the Trusted Launch and disk-encryption documentation referenced by the issue. Review the existing error contract and linked Packer reports for the unsupported combination. Done means the API response clearly identifies the unsupported configuration and the relevant Azure documentation states the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.