more precise docs

This commit is contained in:
Adrien Delorme 2020-03-17 11:50:16 +01:00
parent 911dc5ad95
commit 0a46bb9525
13 changed files with 134 additions and 136 deletions

View File

@ -117,6 +117,8 @@ func main() {
fieldType = `duration string | ex: "1h5m2s"`
case "config.Trilean":
fieldType = `boolean`
case "hcl2template.NameValues":
fieldType = `repeatable "name" & "value" object`
}
field := Field{

View File

@ -14,48 +14,26 @@ import (
"github.com/hashicorp/packer/packer/plugin"
alicloudecsbuilder "github.com/hashicorp/packer/builder/alicloud/ecs"
alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import"
amazonchrootbuilder "github.com/hashicorp/packer/builder/amazon/chroot"
amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs"
amazonebssurrogatebuilder "github.com/hashicorp/packer/builder/amazon/ebssurrogate"
amazonebsvolumebuilder "github.com/hashicorp/packer/builder/amazon/ebsvolume"
amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import"
amazoninstancebuilder "github.com/hashicorp/packer/builder/amazon/instance"
ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local"
ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible"
artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice"
azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm"
azurechrootbuilder "github.com/hashicorp/packer/builder/azure/chroot"
breakpointprovisioner "github.com/hashicorp/packer/provisioner/breakpoint"
checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum"
chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client"
chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo"
cloudstackbuilder "github.com/hashicorp/packer/builder/cloudstack"
compresspostprocessor "github.com/hashicorp/packer/post-processor/compress"
convergeprovisioner "github.com/hashicorp/packer/provisioner/converge"
digitaloceanbuilder "github.com/hashicorp/packer/builder/digitalocean"
digitaloceanimportpostprocessor "github.com/hashicorp/packer/post-processor/digitalocean-import"
dockerbuilder "github.com/hashicorp/packer/builder/docker"
dockerimportpostprocessor "github.com/hashicorp/packer/post-processor/docker-import"
dockerpushpostprocessor "github.com/hashicorp/packer/post-processor/docker-push"
dockersavepostprocessor "github.com/hashicorp/packer/post-processor/docker-save"
dockertagpostprocessor "github.com/hashicorp/packer/post-processor/docker-tag"
exoscaleimportpostprocessor "github.com/hashicorp/packer/post-processor/exoscale-import"
filebuilder "github.com/hashicorp/packer/builder/file"
fileprovisioner "github.com/hashicorp/packer/provisioner/file"
googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute"
googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export"
googlecomputeimportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-import"
hcloudbuilder "github.com/hashicorp/packer/builder/hcloud"
hyperonebuilder "github.com/hashicorp/packer/builder/hyperone"
hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso"
hypervvmcxbuilder "github.com/hashicorp/packer/builder/hyperv/vmcx"
inspecprovisioner "github.com/hashicorp/packer/provisioner/inspec"
jdcloudbuilder "github.com/hashicorp/packer/builder/jdcloud"
linodebuilder "github.com/hashicorp/packer/builder/linode"
lxcbuilder "github.com/hashicorp/packer/builder/lxc"
lxdbuilder "github.com/hashicorp/packer/builder/lxd"
manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest"
ncloudbuilder "github.com/hashicorp/packer/builder/ncloud"
nullbuilder "github.com/hashicorp/packer/builder/null"
oneandonebuilder "github.com/hashicorp/packer/builder/oneandone"
@ -68,25 +46,14 @@ import (
oscchrootbuilder "github.com/hashicorp/packer/builder/osc/chroot"
parallelsisobuilder "github.com/hashicorp/packer/builder/parallels/iso"
parallelspvmbuilder "github.com/hashicorp/packer/builder/parallels/pvm"
powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell"
profitbricksbuilder "github.com/hashicorp/packer/builder/profitbricks"
proxmoxbuilder "github.com/hashicorp/packer/builder/proxmox"
puppetmasterlessprovisioner "github.com/hashicorp/packer/provisioner/puppet-masterless"
puppetserverprovisioner "github.com/hashicorp/packer/provisioner/puppet-server"
qemubuilder "github.com/hashicorp/packer/builder/qemu"
saltmasterlessprovisioner "github.com/hashicorp/packer/provisioner/salt-masterless"
scalewaybuilder "github.com/hashicorp/packer/builder/scaleway"
shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local"
shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local"
shellprovisioner "github.com/hashicorp/packer/provisioner/shell"
sleepprovisioner "github.com/hashicorp/packer/provisioner/sleep"
tencentcloudcvmbuilder "github.com/hashicorp/packer/builder/tencentcloud/cvm"
tritonbuilder "github.com/hashicorp/packer/builder/triton"
ucloudimportpostprocessor "github.com/hashicorp/packer/post-processor/ucloud-import"
uclouduhostbuilder "github.com/hashicorp/packer/builder/ucloud/uhost"
vagrantbuilder "github.com/hashicorp/packer/builder/vagrant"
vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud"
vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant"
virtualboxisobuilder "github.com/hashicorp/packer/builder/virtualbox/iso"
virtualboxovfbuilder "github.com/hashicorp/packer/builder/virtualbox/ovf"
virtualboxvmbuilder "github.com/hashicorp/packer/builder/virtualbox/vm"
@ -94,12 +61,44 @@ import (
vmwarevmxbuilder "github.com/hashicorp/packer/builder/vmware/vmx"
vsphereclonebuilder "github.com/hashicorp/packer/builder/vsphere/clone"
vsphereisobuilder "github.com/hashicorp/packer/builder/vsphere/iso"
yandexbuilder "github.com/hashicorp/packer/builder/yandex"
alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import"
amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import"
artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice"
checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum"
compresspostprocessor "github.com/hashicorp/packer/post-processor/compress"
digitaloceanimportpostprocessor "github.com/hashicorp/packer/post-processor/digitalocean-import"
dockerimportpostprocessor "github.com/hashicorp/packer/post-processor/docker-import"
dockerpushpostprocessor "github.com/hashicorp/packer/post-processor/docker-push"
dockersavepostprocessor "github.com/hashicorp/packer/post-processor/docker-save"
dockertagpostprocessor "github.com/hashicorp/packer/post-processor/docker-tag"
exoscaleimportpostprocessor "github.com/hashicorp/packer/post-processor/exoscale-import"
googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export"
googlecomputeimportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-import"
manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest"
shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local"
ucloudimportpostprocessor "github.com/hashicorp/packer/post-processor/ucloud-import"
vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant"
vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud"
vspherepostprocessor "github.com/hashicorp/packer/post-processor/vsphere"
vspheretemplatepostprocessor "github.com/hashicorp/packer/post-processor/vsphere-template"
ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible"
ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local"
breakpointprovisioner "github.com/hashicorp/packer/provisioner/breakpoint"
chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client"
chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo"
convergeprovisioner "github.com/hashicorp/packer/provisioner/converge"
fileprovisioner "github.com/hashicorp/packer/provisioner/file"
inspecprovisioner "github.com/hashicorp/packer/provisioner/inspec"
powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell"
puppetmasterlessprovisioner "github.com/hashicorp/packer/provisioner/puppet-masterless"
puppetserverprovisioner "github.com/hashicorp/packer/provisioner/puppet-server"
saltmasterlessprovisioner "github.com/hashicorp/packer/provisioner/salt-masterless"
shellprovisioner "github.com/hashicorp/packer/provisioner/shell"
shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local"
sleepprovisioner "github.com/hashicorp/packer/provisioner/sleep"
windowsrestartprovisioner "github.com/hashicorp/packer/provisioner/windows-restart"
windowsshellprovisioner "github.com/hashicorp/packer/provisioner/windows-shell"
yandexbuilder "github.com/hashicorp/packer/builder/yandex"
)
type PluginCommand struct {
@ -158,7 +157,6 @@ var Builders = map[string]packer.Builder{
"yandex": new(yandexbuilder.Builder),
}
var Provisioners = map[string]packer.Provisioner{
"ansible": new(ansibleprovisioner.Provisioner),
"ansible-local": new(ansiblelocalprovisioner.Provisioner),
@ -179,7 +177,6 @@ var Provisioners = map[string]packer.Provisioner{
"windows-shell": new(windowsshellprovisioner.Provisioner),
}
var PostProcessors = map[string]packer.PostProcessor{
"alicloud-import": new(alicloudimportpostprocessor.PostProcessor),
"amazon-import": new(amazonimportpostprocessor.PostProcessor),
@ -203,7 +200,6 @@ var PostProcessors = map[string]packer.PostProcessor{
"vsphere-template": new(vspheretemplatepostprocessor.PostProcessor),
}
var pluginRegexp = regexp.MustCompile("packer-(builder|post-processor|provisioner)-(.+)")
func (c *PluginCommand) Run(args []string) int {

View File

@ -51,7 +51,7 @@
- `tags` (map[string]string) - Tags applied to the destination image and relevant snapshots.
- `tag` (hcl2template.NameValues) - Same as [`tags`](#tags) but defined as a singular repeatable block
- `tag` (repeatable "name" & "value" object) - Same as [`tags`](#tags) but defined as a singular repeatable block
containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -125,7 +125,7 @@
engine](/docs/templates/engine.html), see [Build template
data](#build-template-data) for more information.
- `root_volume_tag` (hcl2template.NameValues) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a
- `root_volume_tag` (repeatable "name" & "value" object) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a
singular block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -32,7 +32,7 @@
[template engine](/docs/templates/engine.html), see [Build template
data](#build-template-data) for more information.
- `tag` (hcl2template.NameValues) - Same as [`tags`](#tags) but defined as a singular repeatable block
- `tag` (repeatable "name" & "value" object) - Same as [`tags`](#tags) but defined as a singular repeatable block
containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.
@ -103,7 +103,7 @@
[template engine](../templates/engine.html), see [Build template
data](#build-template-data) for more information.
- `snapshot_tag` (hcl2template.NameValues) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular
- `snapshot_tag` (repeatable "name" & "value" object) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular
repeatable block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -113,7 +113,7 @@
EBS volumes. This is a [template engine](/docs/templates/engine.html),
see [Build template data](#build-template-data) for more information.
- `run_tag` (hcl2template.NameValues) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
- `run_tag` (repeatable "name" & "value" object) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.
@ -205,7 +205,7 @@
- `spot_tags` (map[string]string) - Requires spot_price to be set. This tells Packer to apply tags to the
spot request that is issued.
- `spot_tag` (hcl2template.NameValues) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block
- `spot_tag` (repeatable "name" & "value" object) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block
containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -4,7 +4,7 @@
completes. This is a [template engine](/docs/templates/engine.html), see
[Build template data](#build-template-data) for more information.
- `tag` (hcl2template.NameValues) - Same as [`tags`](#tags) but defined as a singular repeatable block
- `tag` (repeatable "name" & "value" object) - Same as [`tags`](#tags) but defined as a singular repeatable block
containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -36,7 +36,7 @@
configured in the `ebs_volumes` section as soon as the instance is
reported as 'ready'.
- `run_volume_tag` (hcl2template.NameValues) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
- `run_volume_tag` (repeatable "name" & "value" object) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
repeatable block containing a `name` and a `value` field. In HCL2 mode
the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)

View File

@ -100,7 +100,7 @@
256 characters. Tags are applied to every resource deployed by a Packer
build, i.e. Resource Group, VM, NIC, VNET, Public IP, KeyVault, etc.
- `azure_tag` (hcl2template.NameValues) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block
- `azure_tag` (repeatable "name" & "value" object) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block
containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -17,7 +17,7 @@
- `image_tags` (map[string]string) - Key/value pair tags to add to the created image.
- `image_tag` (hcl2template.NameValues) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable
- `image_tag` (repeatable "name" & "value" object) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable
block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.
@ -29,7 +29,7 @@
- `vm_tags` (map[string]string) - Key/value pair tags to
add to the created server.
- `vm_tag` (hcl2template.NameValues) - Same as [`vm_tags`](#vm_tags) but defined as a singular repeatable block
- `vm_tag` (repeatable "name" & "value" object) - Same as [`vm_tags`](#vm_tags) but defined as a singular repeatable block
containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -55,7 +55,7 @@
- `run_tags` (map[string]string) - Tags to apply to the instance that is *launched* to create the image.
These tags are *not* applied to the resulting image.
- `run_tag` (hcl2template.NameValues) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
- `run_tag` (repeatable "name" & "value" object) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -25,7 +25,7 @@
- `source_machine_tags` (map[string]string) - Tags applied to the VM used to create the image.
- `source_machine_tag` (hcl2template.NameValues) - Same as [`source_machine_tags`](#source_machine_tags) but defined as a
- `source_machine_tag` (repeatable "name" & "value" object) - Same as [`source_machine_tags`](#source_machine_tags) but defined as a
singular block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.

View File

@ -15,7 +15,7 @@
- `image_tags` (map[string]string) - Tag applied to the image.
- `image_tag` (hcl2template.NameValues) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable
- `image_tag` (repeatable "name" & "value" object) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable
block containing a `name` and a `value` field. In HCL2 mode the
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
will allow you to create those programatically.