AB#2287 support community image IDs (#9)

* support community image IDs
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
Fabian Kammel 2022-08-30 15:15:51 +02:00 committed by GitHub
parent e0a457b6ff
commit 778952e07c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 175 additions and 41 deletions

View file

@ -6,6 +6,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
armcomputev2 "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v2"
"github.com/edgelesssys/constellation/internal/cloud/azure"
)
// ScaleSet defines a Azure scale set.
@ -65,9 +66,7 @@ func (s ScaleSet) Azure() armcomputev2.VirtualMachineScaleSet {
LinuxConfiguration: &armcomputev2.LinuxConfiguration{},
},
StorageProfile: &armcomputev2.VirtualMachineScaleSetStorageProfile{
ImageReference: &armcomputev2.ImageReference{
ID: to.Ptr(s.Image),
},
ImageReference: azure.ImageReferenceFromImage(s.Image),
DataDisks: []*armcomputev2.VirtualMachineScaleSetDataDisk{
{
CreateOption: to.Ptr(armcomputev2.DiskCreateOptionTypesEmpty),