mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
Dynamically set apiVersion for Shared Image Gallery scenario.
This commit is contained in:
parent
d21b13cb85
commit
c1e0146d33
1 changed files with 2 additions and 1 deletions
|
|
@ -151,6 +151,7 @@ func (s *TemplateBuilder) SetSharedGalleryImage(location, imageID string) error
|
|||
return err
|
||||
}
|
||||
|
||||
s.setVariable("apiVersion", "2018-04-01") // Required for Shared Image Gallery
|
||||
profile := resource.Properties.StorageProfile
|
||||
profile.ImageReference = &compute.ImageReference{ID: &imageID}
|
||||
profile.OsDisk.OsType = s.osType
|
||||
|
|
@ -500,7 +501,7 @@ const BasicTemplate = `{
|
|||
},
|
||||
"variables": {
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"apiVersion": "2018-04-01",
|
||||
"apiVersion": "2017-03-30",
|
||||
"managedDiskApiVersion": "2017-03-30",
|
||||
"networkInterfacesApiVersion": "2017-04-01",
|
||||
"publicIPAddressApiVersion": "2017-04-01",
|
||||
|
|
|
|||
Loading…
Reference in a new issue