Skip to content

Commit

Permalink
Add Image Type to Azure Machine Provider Spec
Browse files Browse the repository at this point in the history
With Azure marketplace images, some images require that the
subscription accept the terms of a purchase plan before using; and
that purchase plan information must be included in Azure API calls
when provisioning a VM. Images that do not require purchase plans
must not submit purchase plan info.

This adds an image type to distinguish between Marketplace images
with or without purchase plans. It could be used in the future to
support images from galleries.
  • Loading branch information
patrickdillon committed Nov 18, 2021
1 parent 20da846 commit 43b6214
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions machine/v1beta1/types_azureprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ type Image struct {
Version string `json:"version"`
// ResourceID specifies an image to use by ID
ResourceID string `json:"resourceID"`
// Type identifies the source of the image and related information, such as purchase plans.
// Valid values are "ID", "MarketplaceWithPlan", "MarketplaceNoPlan", and omitted, which
// behaves as MarketplaceNoPlan if publisher data is supplied, or ID if not.
// For more information about purchase plans, see:
// https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage#check-the-purchase-plan-information
// +optional
Type string `json:"type,omitempty"`
}

type OSDisk struct {
Expand Down
1 change: 1 addition & 0 deletions machine/v1beta1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43b6214

Please sign in to comment.