Skip to content

Commit

Permalink
azure: don't fill in CommunityGalleryInfo for private galleries
Browse files Browse the repository at this point in the history
Azure will reject any attempts to create a private gallery with the
CommunityGalleryInfo filled in.
  • Loading branch information
Freax13 committed Oct 14, 2024
1 parent c8a482d commit 8444cd1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions azure/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,16 +358,20 @@ func (u *Uploader) ensureSIG(ctx context.Context) error {
return nil
}
u.log.Printf("Creating image gallery %s in %s", sigName, rg)
var communityGalleryInfo *armcomputev5.CommunityGalleryInfo
if u.config.Azure.SharingProfile == "community" {
communityGalleryInfo = &armcomputev5.CommunityGalleryInfo{
PublicNamePrefix: &pubNamePrefix,
Eula: toPtr("none"),
PublisherContact: toPtr("[email protected]"),
PublisherURI: toPtr("https://foo.bar"),
}
}
gallery := armcomputev5.Gallery{
Location: &u.config.Azure.Location,
Properties: &armcomputev5.GalleryProperties{
SharingProfile: &armcomputev5.SharingProfile{
CommunityGalleryInfo: &armcomputev5.CommunityGalleryInfo{
PublicNamePrefix: &pubNamePrefix,
Eula: toPtr("none"),
PublisherContact: toPtr("[email protected]"),
PublisherURI: toPtr("https://foo.bar"),
},
CommunityGalleryInfo: communityGalleryInfo,
Permissions: sharingProf,
},
},
Expand Down

0 comments on commit 8444cd1

Please sign in to comment.