@@ -212,8 +212,24 @@ type Config struct {
212
212
// ```
213
213
SharedGallery SharedImageGallery `mapstructure:"shared_image_gallery" required:"false"`
214
214
// The name of the Shared Image Gallery under which the managed image will be published as Shared Gallery Image version.
215
- //
216
- // Following is an example.
215
+ // A managed image target can also be set when using a shared image gallery destination
216
+ SharedGalleryDestination SharedImageGalleryDestination `mapstructure:"shared_image_gallery_destination"`
217
+ // How long to wait for an image to be published to the shared image
218
+ // gallery before timing out. If your Packer build is failing on the
219
+ // Publishing to Shared Image Gallery step with the error `Original Error:
220
+ // context deadline exceeded`, but the image is present when you check your
221
+ // Azure dashboard, then you probably need to increase this timeout from
222
+ // its default of "60m" (valid time units include `s` for seconds, `m` for
223
+ // minutes, and `h` for hours.)
224
+ SharedGalleryTimeout time.Duration `mapstructure:"shared_image_gallery_timeout"`
225
+ // The end of life date (2006-01-02T15:04:05.99Z) of the gallery Image Version. This property
226
+ // can be used for decommissioning purposes.
227
+ SharedGalleryImageVersionEndOfLifeDate string `mapstructure:"shared_gallery_image_version_end_of_life_date" required:"false"`
228
+ // The number of replicas of the Image Version to be created per region defined in `replication_regions`.
229
+ // Users using `target_region` blocks can specify individual replica counts per region using the `replicas` field.
230
+ SharedGalleryImageVersionReplicaCount int64 `mapstructure:"shared_image_gallery_replica_count" required:"false"`
231
+ // If set to true, Virtual Machines deployed from the latest version of the
232
+ // Image Definition won't use this Image Version.
217
233
//
218
234
// In JSON
219
235
// ```json
@@ -225,8 +241,13 @@ type Config struct {
225
241
// "image_version": "1.0.0",
226
242
// "replication_regions": ["regionA", "regionB", "regionC"],
227
243
// "storage_account_type": "Standard_LRS"
228
- // }
244
+ // },
245
+ // "shared_image_gallery_timeout": "60m",
246
+ // "shared_gallery_image_version_end_of_life_date": "2006-01-02T15:04:05.99Z",
247
+ // "shared_gallery_image_version_replica_count": 1,
248
+ // "shared_gallery_image_version_exclude_from_latest": true
229
249
// ```
250
+ //
230
251
// In HCL2
231
252
// ```hcl
232
253
// shared_image_gallery_destination {
@@ -246,26 +267,11 @@ type Config struct {
246
267
// name = "regionC"
247
268
// }
248
269
// }
270
+ // shared_image_gallery_timeout = "60m"
271
+ // shared_gallery_image_version_end_of_life_date = "2006-01-02T15:04:05.99Z"
272
+ // shared_gallery_image_version_replica_count = 1
273
+ // shared_gallery_image_version_exclude_from_latest = true
249
274
// ```
250
- // A managed image target can also be set when using a shared image gallery destination
251
-
252
- SharedGalleryDestination SharedImageGalleryDestination `mapstructure:"shared_image_gallery_destination"`
253
- // How long to wait for an image to be published to the shared image
254
- // gallery before timing out. If your Packer build is failing on the
255
- // Publishing to Shared Image Gallery step with the error `Original Error:
256
- // context deadline exceeded`, but the image is present when you check your
257
- // Azure dashboard, then you probably need to increase this timeout from
258
- // its default of "60m" (valid time units include `s` for seconds, `m` for
259
- // minutes, and `h` for hours.)
260
- SharedGalleryTimeout time.Duration `mapstructure:"shared_image_gallery_timeout"`
261
- // The end of life date (2006-01-02T15:04:05.99Z) of the gallery Image Version. This property
262
- // can be used for decommissioning purposes.
263
- SharedGalleryImageVersionEndOfLifeDate string `mapstructure:"shared_gallery_image_version_end_of_life_date" required:"false"`
264
- // The number of replicas of the Image Version to be created per region defined in `replication_regions`.
265
- // Users using `target_region` blocks can specify individual replica counts per region using the `replicas` field.
266
- SharedGalleryImageVersionReplicaCount int64 `mapstructure:"shared_image_gallery_replica_count" required:"false"`
267
- // If set to true, Virtual Machines deployed from the latest version of the
268
- // Image Definition won't use this Image Version.
269
275
SharedGalleryImageVersionExcludeFromLatest bool `mapstructure:"shared_gallery_image_version_exclude_from_latest" required:"false"`
270
276
// Name of the publisher to use for your base image (Azure Marketplace Images only). See
271
277
// [documentation](https://docs.microsoft.com/en-us/cli/azure/vm/image)
0 commit comments