cloudbase / garm-provider-azure

Garm external provider for Azure
https://github.com/cloudbase/garm-provider-azure
Apache License 2.0
3 stars 7 forks source link

Allow to specify vm-image Id #15

Closed maigl closed 8 months ago

maigl commented 8 months ago

I think this is related to https://github.com/cloudbase/garm-provider-azure/issues/9

Use case

I want to build my own images (with packer) and hold them in my own gallery. I'm not an azure expert but afaik if one wants to specify a custom image this is only be possible by imageID and not by URN.

I did a small (hard-coded) test and specified my imageId here https://github.com/cloudbase/garm-provider-azure/blob/058e319e6e90bedc647080d692c162be06b9fd5c/internal/spec/spec.go#L438 instead of publisher, offer and sku, and this worked nicely.

Idea

So I guess it would be very helpful if we would try to extract the URN, and if that fails we use the value directly as imageID. wdyt?

Michael Kuhnt michael.kuhnt@mercedes-benz.com Mercedes-Benz Tech Innovation GmbH (ProviderInformation)

gabriel-samfira commented 8 months ago

Hah. Good point. Gimme a sec

gabriel-samfira commented 8 months ago

See if: https://github.com/cloudbase/garm-provider-azure/pull/16 works for you