You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Packer Post-Processor plugin for updating JSON files.
9
+
10
+
This is handy when you want to update one or more JSON files after Packer already finish executing the builders.
11
+
12
+
An example scenario is when you have several Packer templates where the built image of a template becomes the source of a number of other templates.
13
+
14
+
Installation
15
+
------------
16
+
17
+
Build `packer-post-processor-json-updater` using `go build` or other build tools, then follow [Packer documentation on installing plugins](https://www.packer.io/docs/extend/plugins.html).
18
+
19
+
Usage
20
+
-----
21
+
22
+
Add `json-updater` type to Packer template's post-processor section:
23
+
24
+
"post-processors": [
25
+
{
26
+
"type": "json-updater",
27
+
"ami_id": {
28
+
"templates/child_template_1.json": [
29
+
"variables.aws_source_ami"
30
+
],
31
+
"templates/child_template_2.json": [
32
+
"variables.aws_source_ami"
33
+
]
34
+
}
35
+
}
36
+
]
37
+
38
+
The above `ami_id` configuration indicates that the ID of the newly created AWS AMI will be set as the value of `variables.aws_source_ami` key in `templates/child_template_1.json` and `templates/child_template_2.json` files.
0 commit comments