-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
azure: don't fill in CommunityGalleryInfo for private galleries
Azure will reject any attempts to create a private gallery with the CommunityGalleryInfo filled in.
- Loading branch information
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
}, | ||
}, | ||
|