errs=packer.MultiErrorAppend(errs,fmt.Errorf("Specify either a VHD (image_url), Image Reference (image_publisher, image_offer, image_sku), a Managed Disk (custom_managed_disk_image_name, custom_managed_disk_resource_group_name), or a Shared Gallery Image (shared_gallery_subscription, shared_gallery_resource_group, shared_gallery_name, shared_gallery_image_name)"))
errs=packer.MultiErrorAppend(errs,fmt.Errorf("Specify either a VHD (image_url), Image Reference (image_publisher, image_offer, image_sku), a Managed Disk (custom_managed_disk_image_name, custom_managed_disk_resource_group_name), or a Shared Gallery Image (shared_image_gallery)"))
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A managed image must be created from a managed image, it cannot be created from a VHD."))
}
ifc.SharedGalleryName!=""{
ifc.SharedGallerySubscription==""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A shared_gallery_subscription must be specified"))
ifc.SharedGallery.GalleryName!=""{
ifc.SharedGallery.Subscription==""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A shared_image_gallery.subscription must be specified"))
}
ifc.SharedGallery.ResourceGroup==""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A shared_image_gallery.resource_group must be specified"))
}
ifc.SharedGallery.ImageName==""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A shared_image_gallery.image_name must be specified"))
}
ifc.SharedGalleryResourceGroup==""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A shared_gallery_resource_group must be specified"))
ifc.CaptureContainerName != ""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("VHD Target [capture_container_name] is not supported when using Shared Image Gallery as source. Use managed_image_resource_group_name instead."))
}
ifc.SharedGalleryImageName==""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("A shared_gallery_image_name must be specified"))
ifc.CaptureNamePrefix != ""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("VHD Target [capture_name_prefix] is not supported when using Shared Image Gallery as source. Use managed_image_name instead."))
}
ifc.CaptureContainerName!=""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("VHD Target [capture_container_name] is not supported when using Shared Image Gallery as source. Use managed_image_resource_group_name instead."))
}
ifc.CaptureNamePrefix!=""{
errs=packer.MultiErrorAppend(errs,fmt.Errorf("VHD Target [capture_name_prefix] is not supported when using Shared Image Gallery as source. Use managed_image_name instead."))
@ -186,6 +186,19 @@ Providing `temp_resource_group_name` or `location` in combination with `build_re
1. PlanPublisher
1. PlanPromotionCode
- `shared_image_gallery` (object) Use a [Shared Gallery image](https://azure.microsoft.com/en-us/blog/announcing-the-public-preview-of-shared-image-gallery/) as the source for this build. *VHD targets are incompatible with this build type* - the target must be a *Managed Image*.