mirror of https://github.com/hashicorp/packer
hcl2_upgrade: add share_image_gallery workaround (#12087)
In azure templates, the shared_image_gallery was mistakenly considered an attribute while this is supposed to be a block. This is due to a heuristic we use for deciding whether a JSON object is to be translated to an attribute or a block that fell short as the shared_image_gallery does not contain complex types. This cannot be fixed trivially for the general case, so we add this entity to the list of workarounds until we can implement something more robust.pull/12015/head
parent
0bac9b6f63
commit
68ddb2f89d
@ -0,0 +1,11 @@
|
||||
|
||||
source "azure-arm" "autogenerated_1" {
|
||||
shared_image_gallery {
|
||||
gallery_name = "web_app"
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.azure-arm.autogenerated_1"]
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"builders": [{
|
||||
"type": "azure-arm",
|
||||
"shared_image_gallery": {
|
||||
"gallery_name": "web_app"
|
||||
}
|
||||
}]
|
||||
}
|
||||
Loading…
Reference in new issue