diff --git a/builder/alicloud/ecs/builder.hcl2spec.go b/builder/alicloud/ecs/builder.hcl2spec.go index 86546392c..a74d66eb4 100644 --- a/builder/alicloud/ecs/builder.hcl2spec.go +++ b/builder/alicloud/ecs/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,AlicloudDiskDevice"; DO NOT EDIT. + package ecs import ( diff --git a/builder/amazon/chroot/builder.hcl2spec.go b/builder/amazon/chroot/builder.hcl2spec.go index 18923e4af..c04b4cb7d 100644 --- a/builder/amazon/chroot/builder.hcl2spec.go +++ b/builder/amazon/chroot/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,BlockDevices,BlockDevice"; DO NOT EDIT. + package chroot import ( diff --git a/builder/amazon/common/access_config.hcl2spec.go b/builder/amazon/common/access_config.hcl2spec.go index 177553620..7ad4fd02e 100644 --- a/builder/amazon/common/access_config.hcl2spec.go +++ b/builder/amazon/common/access_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type VaultAWSEngineOptions,AssumeRoleConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/amazon/common/block_device.hcl2spec.go b/builder/amazon/common/block_device.hcl2spec.go index ec3771d11..a6c10e22f 100644 --- a/builder/amazon/common/block_device.hcl2spec.go +++ b/builder/amazon/common/block_device.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type BlockDevice"; DO NOT EDIT. + package common import ( diff --git a/builder/amazon/common/run_config.hcl2spec.go b/builder/amazon/common/run_config.hcl2spec.go index 49ad3950b..67c743044 100644 --- a/builder/amazon/common/run_config.hcl2spec.go +++ b/builder/amazon/common/run_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type AmiFilterOptions,SecurityGroupFilterOptions,SubnetFilterOptions,VpcFilterOptions,PolicyDocument,Statement"; DO NOT EDIT. + package common import ( diff --git a/builder/amazon/common/state.hcl2spec.go b/builder/amazon/common/state.hcl2spec.go index e3c240f89..a3ec85817 100644 --- a/builder/amazon/common/state.hcl2spec.go +++ b/builder/amazon/common/state.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type AWSPollingConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/amazon/ebs/builder.hcl2spec.go b/builder/amazon/ebs/builder.hcl2spec.go index c89a030d6..bc55f2398 100644 --- a/builder/amazon/ebs/builder.hcl2spec.go +++ b/builder/amazon/ebs/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package ebs import ( diff --git a/builder/amazon/ebssurrogate/builder.hcl2spec.go b/builder/amazon/ebssurrogate/builder.hcl2spec.go index 976c942c2..36d7aea4d 100644 --- a/builder/amazon/ebssurrogate/builder.hcl2spec.go +++ b/builder/amazon/ebssurrogate/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,RootBlockDevice,BlockDevice"; DO NOT EDIT. + package ebssurrogate import ( diff --git a/builder/amazon/ebsvolume/builder.hcl2spec.go b/builder/amazon/ebsvolume/builder.hcl2spec.go index 91c0cbc6c..76d1f0a8e 100644 --- a/builder/amazon/ebsvolume/builder.hcl2spec.go +++ b/builder/amazon/ebsvolume/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,BlockDevice"; DO NOT EDIT. + package ebsvolume import ( diff --git a/builder/amazon/instance/builder.hcl2spec.go b/builder/amazon/instance/builder.hcl2spec.go index 0f146f05a..0f48f3cb7 100644 --- a/builder/amazon/instance/builder.hcl2spec.go +++ b/builder/amazon/instance/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package instance import ( diff --git a/builder/azure/arm/config.hcl2spec.go b/builder/azure/arm/config.hcl2spec.go index 29d725f7d..28dd0c721 100644 --- a/builder/azure/arm/config.hcl2spec.go +++ b/builder/azure/arm/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,SharedImageGallery,SharedImageGalleryDestination,PlanInformation"; DO NOT EDIT. + package arm import ( diff --git a/builder/azure/chroot/builder.hcl2spec.go b/builder/azure/chroot/builder.hcl2spec.go index 4ace06b46..6e233f2b1 100644 --- a/builder/azure/chroot/builder.hcl2spec.go +++ b/builder/azure/chroot/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package chroot import ( diff --git a/builder/azure/chroot/shared_image_gallery_destination.hcl2spec.go b/builder/azure/chroot/shared_image_gallery_destination.hcl2spec.go index f227920ad..cd708e96d 100644 --- a/builder/azure/chroot/shared_image_gallery_destination.hcl2spec.go +++ b/builder/azure/chroot/shared_image_gallery_destination.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type SharedImageGalleryDestination,TargetRegion"; DO NOT EDIT. + package chroot import ( diff --git a/builder/azure/dtl/config.hcl2spec.go b/builder/azure/dtl/config.hcl2spec.go index 4986ced94..c7bc974a7 100644 --- a/builder/azure/dtl/config.hcl2spec.go +++ b/builder/azure/dtl/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,SharedImageGallery,SharedImageGalleryDestination,DtlArtifact,ArtifactParameter"; DO NOT EDIT. + package dtl import ( diff --git a/builder/cloudstack/config.hcl2spec.go b/builder/cloudstack/config.hcl2spec.go index 2fc182ae3..171a7dffa 100644 --- a/builder/cloudstack/config.hcl2spec.go +++ b/builder/cloudstack/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package cloudstack import ( diff --git a/builder/digitalocean/config.hcl2spec.go b/builder/digitalocean/config.hcl2spec.go index ef07b3626..b55bd0891 100644 --- a/builder/digitalocean/config.hcl2spec.go +++ b/builder/digitalocean/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package digitalocean import ( diff --git a/builder/docker/config.hcl2spec.go b/builder/docker/config.hcl2spec.go index c0472c3bb..f393c9bfe 100644 --- a/builder/docker/config.hcl2spec.go +++ b/builder/docker/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package docker import ( diff --git a/builder/file/config.hcl2spec.go b/builder/file/config.hcl2spec.go index 28d36410f..4583c1e98 100644 --- a/builder/file/config.hcl2spec.go +++ b/builder/file/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package file import ( diff --git a/builder/googlecompute/config.hcl2spec.go b/builder/googlecompute/config.hcl2spec.go index 6c98d8a2a..7001840be 100644 --- a/builder/googlecompute/config.hcl2spec.go +++ b/builder/googlecompute/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,CustomerEncryptionKey"; DO NOT EDIT. + package googlecompute import ( diff --git a/builder/googlecompute/step_start_tunnel.hcl2spec.go b/builder/googlecompute/step_start_tunnel.hcl2spec.go index 022efadf1..d28e0d39d 100644 --- a/builder/googlecompute/step_start_tunnel.hcl2spec.go +++ b/builder/googlecompute/step_start_tunnel.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type IAPConfig"; DO NOT EDIT. + package googlecompute import ( diff --git a/builder/hcloud/config.hcl2spec.go b/builder/hcloud/config.hcl2spec.go index 1b8430684..c4f75aa0b 100644 --- a/builder/hcloud/config.hcl2spec.go +++ b/builder/hcloud/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,imageFilter"; DO NOT EDIT. + package hcloud import ( diff --git a/builder/hyperone/config.hcl2spec.go b/builder/hyperone/config.hcl2spec.go index 24cfca117..8bc7b08c2 100644 --- a/builder/hyperone/config.hcl2spec.go +++ b/builder/hyperone/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package hyperone import ( diff --git a/builder/hyperv/common/output_config.hcl2spec.go b/builder/hyperv/common/output_config.hcl2spec.go index 4839de60e..461ca31dc 100644 --- a/builder/hyperv/common/output_config.hcl2spec.go +++ b/builder/hyperv/common/output_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type OutputConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/hyperv/iso/builder.hcl2spec.go b/builder/hyperv/iso/builder.hcl2spec.go index 8cc2b4786..afc83c364 100644 --- a/builder/hyperv/iso/builder.hcl2spec.go +++ b/builder/hyperv/iso/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package iso import ( diff --git a/builder/hyperv/vmcx/builder.hcl2spec.go b/builder/hyperv/vmcx/builder.hcl2spec.go index 7a038c083..2b827e8c2 100644 --- a/builder/hyperv/vmcx/builder.hcl2spec.go +++ b/builder/hyperv/vmcx/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vmcx import ( diff --git a/builder/jdcloud/common.hcl2spec.go b/builder/jdcloud/common.hcl2spec.go index dadbb8e56..5a1b2d912 100644 --- a/builder/jdcloud/common.hcl2spec.go +++ b/builder/jdcloud/common.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package jdcloud import ( diff --git a/builder/linode/config.hcl2spec.go b/builder/linode/config.hcl2spec.go index ca737e789..9420b8aba 100644 --- a/builder/linode/config.hcl2spec.go +++ b/builder/linode/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package linode import ( diff --git a/builder/lxc/config.hcl2spec.go b/builder/lxc/config.hcl2spec.go index 780477b73..2d501ca4a 100644 --- a/builder/lxc/config.hcl2spec.go +++ b/builder/lxc/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package lxc import ( diff --git a/builder/lxd/config.hcl2spec.go b/builder/lxd/config.hcl2spec.go index 803571182..4759e91c4 100644 --- a/builder/lxd/config.hcl2spec.go +++ b/builder/lxd/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package lxd import ( diff --git a/builder/ncloud/config.hcl2spec.go b/builder/ncloud/config.hcl2spec.go index b0e2013a3..8335d7639 100644 --- a/builder/ncloud/config.hcl2spec.go +++ b/builder/ncloud/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package ncloud import ( diff --git a/builder/null/config.hcl2spec.go b/builder/null/config.hcl2spec.go index ecea3e994..03b0d7707 100644 --- a/builder/null/config.hcl2spec.go +++ b/builder/null/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package null import ( diff --git a/builder/oneandone/config.hcl2spec.go b/builder/oneandone/config.hcl2spec.go index 05ca4c7a4..8fc50685a 100644 --- a/builder/oneandone/config.hcl2spec.go +++ b/builder/oneandone/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package oneandone import ( diff --git a/builder/openstack/builder.hcl2spec.go b/builder/openstack/builder.hcl2spec.go index e85e8ecc4..1ce0911cf 100644 --- a/builder/openstack/builder.hcl2spec.go +++ b/builder/openstack/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,ImageFilter,ImageFilterOptions"; DO NOT EDIT. + package openstack import ( diff --git a/builder/oracle/classic/builder.hcl2spec.go b/builder/oracle/classic/builder.hcl2spec.go index 72e57b0e6..29e98b6be 100644 --- a/builder/oracle/classic/builder.hcl2spec.go +++ b/builder/oracle/classic/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package classic import ( diff --git a/builder/oracle/oci/config.hcl2spec.go b/builder/oracle/oci/config.hcl2spec.go index a73347ed2..f80dd58fe 100644 --- a/builder/oracle/oci/config.hcl2spec.go +++ b/builder/oracle/oci/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,CreateVNICDetails,ListImagesRequest"; DO NOT EDIT. + package oci import ( diff --git a/builder/osc/bsu/builder.hcl2spec.go b/builder/osc/bsu/builder.hcl2spec.go index 0b09c2099..852499d7c 100644 --- a/builder/osc/bsu/builder.hcl2spec.go +++ b/builder/osc/bsu/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package bsu import ( diff --git a/builder/osc/bsusurrogate/builder.hcl2spec.go b/builder/osc/bsusurrogate/builder.hcl2spec.go index 8912e9f35..30e58c816 100644 --- a/builder/osc/bsusurrogate/builder.hcl2spec.go +++ b/builder/osc/bsusurrogate/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,RootBlockDevice"; DO NOT EDIT. + package bsusurrogate import ( diff --git a/builder/osc/bsuvolume/builder.hcl2spec.go b/builder/osc/bsuvolume/builder.hcl2spec.go index c7adc465b..ebd028b85 100644 --- a/builder/osc/bsuvolume/builder.hcl2spec.go +++ b/builder/osc/bsuvolume/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,BlockDevice"; DO NOT EDIT. + package bsuvolume import ( diff --git a/builder/osc/chroot/builder.hcl2spec.go b/builder/osc/chroot/builder.hcl2spec.go index cf16a909a..b4b1fecea 100644 --- a/builder/osc/chroot/builder.hcl2spec.go +++ b/builder/osc/chroot/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package chroot import ( diff --git a/builder/osc/common/run_config.hcl2spec.go b/builder/osc/common/run_config.hcl2spec.go index 47ee128f7..a15e89439 100644 --- a/builder/osc/common/run_config.hcl2spec.go +++ b/builder/osc/common/run_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type SecurityGroupFilterOptions,OmiFilterOptions,SubnetFilterOptions,NetFilterOptions,BlockDevice"; DO NOT EDIT. + package common import ( diff --git a/builder/parallels/iso/builder.hcl2spec.go b/builder/parallels/iso/builder.hcl2spec.go index c1a121ea2..9ab62b8c3 100644 --- a/builder/parallels/iso/builder.hcl2spec.go +++ b/builder/parallels/iso/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package iso import ( diff --git a/builder/parallels/pvm/config.hcl2spec.go b/builder/parallels/pvm/config.hcl2spec.go index 623ce9180..432bafe17 100644 --- a/builder/parallels/pvm/config.hcl2spec.go +++ b/builder/parallels/pvm/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package pvm import ( diff --git a/builder/profitbricks/config.hcl2spec.go b/builder/profitbricks/config.hcl2spec.go index c8e57de99..2d907387c 100644 --- a/builder/profitbricks/config.hcl2spec.go +++ b/builder/profitbricks/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package profitbricks import ( diff --git a/builder/proxmox/clone/config.hcl2spec.go b/builder/proxmox/clone/config.hcl2spec.go index 5642f4631..b3521bbae 100644 --- a/builder/proxmox/clone/config.hcl2spec.go +++ b/builder/proxmox/clone/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package proxmoxclone import ( diff --git a/builder/proxmox/common/config.hcl2spec.go b/builder/proxmox/common/config.hcl2spec.go index a9fc552cf..7e1be50c3 100644 --- a/builder/proxmox/common/config.hcl2spec.go +++ b/builder/proxmox/common/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig,storageConfig"; DO NOT EDIT. + package proxmox import ( diff --git a/builder/proxmox/iso/config.hcl2spec.go b/builder/proxmox/iso/config.hcl2spec.go index 59858f4b1..aa3fd4cd2 100644 --- a/builder/proxmox/iso/config.hcl2spec.go +++ b/builder/proxmox/iso/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig"; DO NOT EDIT. + package proxmoxiso import ( diff --git a/builder/qemu/config.hcl2spec.go b/builder/qemu/config.hcl2spec.go index 33c7fe131..ca16e2a03 100644 --- a/builder/qemu/config.hcl2spec.go +++ b/builder/qemu/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,QemuImgArgs"; DO NOT EDIT. + package qemu import ( diff --git a/builder/scaleway/config.hcl2spec.go b/builder/scaleway/config.hcl2spec.go index 75f1acc0d..32a04f1eb 100644 --- a/builder/scaleway/config.hcl2spec.go +++ b/builder/scaleway/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package scaleway import ( diff --git a/builder/tencentcloud/cvm/builder.hcl2spec.go b/builder/tencentcloud/cvm/builder.hcl2spec.go index e5612fc12..72aa43efd 100644 --- a/builder/tencentcloud/cvm/builder.hcl2spec.go +++ b/builder/tencentcloud/cvm/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package cvm import ( diff --git a/builder/tencentcloud/cvm/run_config.hcl2spec.go b/builder/tencentcloud/cvm/run_config.hcl2spec.go index b268aa8eb..776a951f0 100644 --- a/builder/tencentcloud/cvm/run_config.hcl2spec.go +++ b/builder/tencentcloud/cvm/run_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type tencentCloudDataDisk"; DO NOT EDIT. + package cvm import ( diff --git a/builder/triton/config.hcl2spec.go b/builder/triton/config.hcl2spec.go index fa8427aad..9e636c346 100644 --- a/builder/triton/config.hcl2spec.go +++ b/builder/triton/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package triton import ( diff --git a/builder/triton/source_machine_config.hcl2spec.go b/builder/triton/source_machine_config.hcl2spec.go index 619a24a4f..9df636ac4 100644 --- a/builder/triton/source_machine_config.hcl2spec.go +++ b/builder/triton/source_machine_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type MachineImageFilter"; DO NOT EDIT. + package triton import ( diff --git a/builder/ucloud/common/image_config.hcl2spec.go b/builder/ucloud/common/image_config.hcl2spec.go index 33de61b5d..436a6b467 100644 --- a/builder/ucloud/common/image_config.hcl2spec.go +++ b/builder/ucloud/common/image_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type ImageDestination"; DO NOT EDIT. + package common import ( diff --git a/builder/ucloud/uhost/builder.hcl2spec.go b/builder/ucloud/uhost/builder.hcl2spec.go index 025ce96e6..01aa9562f 100644 --- a/builder/ucloud/uhost/builder.hcl2spec.go +++ b/builder/ucloud/uhost/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package uhost import ( diff --git a/builder/vagrant/builder.hcl2spec.go b/builder/vagrant/builder.hcl2spec.go index 90efb5b7e..e815fa016 100644 --- a/builder/vagrant/builder.hcl2spec.go +++ b/builder/vagrant/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vagrant import ( diff --git a/builder/virtualbox/iso/builder.hcl2spec.go b/builder/virtualbox/iso/builder.hcl2spec.go index 1c67d106a..a931724c1 100644 --- a/builder/virtualbox/iso/builder.hcl2spec.go +++ b/builder/virtualbox/iso/builder.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package iso import ( diff --git a/builder/virtualbox/ovf/config.hcl2spec.go b/builder/virtualbox/ovf/config.hcl2spec.go index e6e3a5a41..845b27f24 100644 --- a/builder/virtualbox/ovf/config.hcl2spec.go +++ b/builder/virtualbox/ovf/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package ovf import ( diff --git a/builder/virtualbox/vm/config.hcl2spec.go b/builder/virtualbox/vm/config.hcl2spec.go index abfd53e78..e672cd48b 100644 --- a/builder/virtualbox/vm/config.hcl2spec.go +++ b/builder/virtualbox/vm/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vm import ( diff --git a/builder/vmware/iso/config.hcl2spec.go b/builder/vmware/iso/config.hcl2spec.go index 78ff3681e..724157428 100644 --- a/builder/vmware/iso/config.hcl2spec.go +++ b/builder/vmware/iso/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package iso import ( diff --git a/builder/vmware/vmx/config.hcl2spec.go b/builder/vmware/vmx/config.hcl2spec.go index 72a393b2c..30a674b09 100644 --- a/builder/vmware/vmx/config.hcl2spec.go +++ b/builder/vmware/vmx/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vmx import ( diff --git a/builder/vsphere/clone/config.hcl2spec.go b/builder/vsphere/clone/config.hcl2spec.go index ca49332d2..790eeb7ae 100644 --- a/builder/vsphere/clone/config.hcl2spec.go +++ b/builder/vsphere/clone/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package clone import ( diff --git a/builder/vsphere/clone/step_clone.hcl2spec.go b/builder/vsphere/clone/step_clone.hcl2spec.go index a0422e28e..41897a0fb 100644 --- a/builder/vsphere/clone/step_clone.hcl2spec.go +++ b/builder/vsphere/clone/step_clone.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type CloneConfig,vAppConfig"; DO NOT EDIT. + package clone import ( diff --git a/builder/vsphere/clone/step_customize.hcl2spec.go b/builder/vsphere/clone/step_customize.hcl2spec.go index 2620122b2..0634474a3 100644 --- a/builder/vsphere/clone/step_customize.hcl2spec.go +++ b/builder/vsphere/clone/step_customize.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type CustomizeConfig,LinuxOptions,NetworkInterfaces,NetworkInterface,GlobalDnsSettings,GlobalRoutingSettings"; DO NOT EDIT. + package clone import ( diff --git a/builder/vsphere/common/config_location.hcl2spec.go b/builder/vsphere/common/config_location.hcl2spec.go index c513f8276..c55712475 100644 --- a/builder/vsphere/common/config_location.hcl2spec.go +++ b/builder/vsphere/common/config_location.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type LocationConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/output_config.hcl2spec.go b/builder/vsphere/common/output_config.hcl2spec.go index 1ad51412c..13847fcbc 100644 --- a/builder/vsphere/common/output_config.hcl2spec.go +++ b/builder/vsphere/common/output_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type OutputConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_add_cdrom.hcl2spec.go b/builder/vsphere/common/step_add_cdrom.hcl2spec.go index 6890fe091..205232829 100644 --- a/builder/vsphere/common/step_add_cdrom.hcl2spec.go +++ b/builder/vsphere/common/step_add_cdrom.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type CDRomConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_add_floppy.hcl2spec.go b/builder/vsphere/common/step_add_floppy.hcl2spec.go index 6f4956d99..a42511314 100644 --- a/builder/vsphere/common/step_add_floppy.hcl2spec.go +++ b/builder/vsphere/common/step_add_floppy.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type FloppyConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_config_params.hcl2spec.go b/builder/vsphere/common/step_config_params.hcl2spec.go index 1339670f2..a68cb3ad2 100644 --- a/builder/vsphere/common/step_config_params.hcl2spec.go +++ b/builder/vsphere/common/step_config_params.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type ConfigParamsConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_connect.hcl2spec.go b/builder/vsphere/common/step_connect.hcl2spec.go index dad7c3a14..fa5782e33 100644 --- a/builder/vsphere/common/step_connect.hcl2spec.go +++ b/builder/vsphere/common/step_connect.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type ConnectConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_export.hcl2spec.go b/builder/vsphere/common/step_export.hcl2spec.go index e3cbd0169..f7d24dbbe 100644 --- a/builder/vsphere/common/step_export.hcl2spec.go +++ b/builder/vsphere/common/step_export.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type ExportConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_hardware.hcl2spec.go b/builder/vsphere/common/step_hardware.hcl2spec.go index a56558fba..334e6a644 100644 --- a/builder/vsphere/common/step_hardware.hcl2spec.go +++ b/builder/vsphere/common/step_hardware.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type HardwareConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_import_to_content_library.hcl2spec.go b/builder/vsphere/common/step_import_to_content_library.hcl2spec.go index 5093dc930..2c42538fb 100644 --- a/builder/vsphere/common/step_import_to_content_library.hcl2spec.go +++ b/builder/vsphere/common/step_import_to_content_library.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type ContentLibraryDestinationConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_remove_cdrom.hcl2spec.go b/builder/vsphere/common/step_remove_cdrom.hcl2spec.go index b4f333504..826cacdf4 100644 --- a/builder/vsphere/common/step_remove_cdrom.hcl2spec.go +++ b/builder/vsphere/common/step_remove_cdrom.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type RemoveCDRomConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_run.hcl2spec.go b/builder/vsphere/common/step_run.hcl2spec.go index 00e6ac181..5ecc99cae 100644 --- a/builder/vsphere/common/step_run.hcl2spec.go +++ b/builder/vsphere/common/step_run.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type RunConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_shutdown.hcl2spec.go b/builder/vsphere/common/step_shutdown.hcl2spec.go index c53298f24..323e771c8 100644 --- a/builder/vsphere/common/step_shutdown.hcl2spec.go +++ b/builder/vsphere/common/step_shutdown.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type ShutdownConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/step_wait_for_ip.hcl2spec.go b/builder/vsphere/common/step_wait_for_ip.hcl2spec.go index 1424a62a4..c65302f31 100644 --- a/builder/vsphere/common/step_wait_for_ip.hcl2spec.go +++ b/builder/vsphere/common/step_wait_for_ip.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type WaitIpConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/common/storage_config.hcl2spec.go b/builder/vsphere/common/storage_config.hcl2spec.go index 37d8722a2..1d8fbd8c5 100644 --- a/builder/vsphere/common/storage_config.hcl2spec.go +++ b/builder/vsphere/common/storage_config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type StorageConfig,DiskConfig"; DO NOT EDIT. + package common import ( diff --git a/builder/vsphere/iso/config.hcl2spec.go b/builder/vsphere/iso/config.hcl2spec.go index f8f31ec3b..dea92fa94 100644 --- a/builder/vsphere/iso/config.hcl2spec.go +++ b/builder/vsphere/iso/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package iso import ( diff --git a/builder/vsphere/iso/step_create.hcl2spec.go b/builder/vsphere/iso/step_create.hcl2spec.go index 06360e6ac..9d9699529 100644 --- a/builder/vsphere/iso/step_create.hcl2spec.go +++ b/builder/vsphere/iso/step_create.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type NIC,CreateConfig"; DO NOT EDIT. + package iso import ( diff --git a/builder/yandex/config.hcl2spec.go b/builder/yandex/config.hcl2spec.go index 3e0ec7661..ef5fe9ccd 100644 --- a/builder/yandex/config.hcl2spec.go +++ b/builder/yandex/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package yandex import ( diff --git a/cmd/mapstructure-to-hcl2/mapstructure-to-hcl2.go b/cmd/mapstructure-to-hcl2/mapstructure-to-hcl2.go index 8d5e3c0f1..36b48168f 100644 --- a/cmd/mapstructure-to-hcl2/mapstructure-to-hcl2.go +++ b/cmd/mapstructure-to-hcl2/mapstructure-to-hcl2.go @@ -141,7 +141,7 @@ func main() { out := bytes.NewBuffer(nil) fmt.Fprintf(out, `// Code generated by "%s %s"; DO NOT EDIT.`, mapstructureToHCL2, strings.Join(os.Args[1:], " ")) - fmt.Fprintf(out, "\npackage %s\n", topPkg.Name) + fmt.Fprintf(out, "\n\npackage %s\n", topPkg.Name) delete(usedImports, NamePath{topPkg.Name, topPkg.PkgPath}) usedImports[NamePath{"hcldec", "github.com/hashicorp/hcl/v2/hcldec"}] = types.NewPackage("hcldec", "github.com/hashicorp/hcl/v2/hcldec") diff --git a/hcl2template/internal/mock.hcl2spec.go b/hcl2template/internal/mock.hcl2spec.go index 85c315e32..1ea841fe3 100644 --- a/hcl2template/internal/mock.hcl2spec.go +++ b/hcl2template/internal/mock.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag"; DO NOT EDIT. + package hcl2template import ( diff --git a/packer-plugin-sdk/acctest/doc.go b/packer-plugin-sdk/acctest/doc.go index 5300ec44f..5d0f77325 100644 --- a/packer-plugin-sdk/acctest/doc.go +++ b/packer-plugin-sdk/acctest/doc.go @@ -1,6 +1,6 @@ /* -The acctest package provides an acceptance testing framework for testing -builders and provisioners. +Package acctest provides an acceptance testing framework for testing builders +and provisioners. Writing Provisioner Acceptance Tests @@ -240,5 +240,4 @@ Once you finish these steps, you should be ready to run your new provisioner acceptance test by setting the name used in the BuildersAccTest map as your `ACC_TEST_BUILDERS` environment variable. */ - package acctest diff --git a/packer-plugin-sdk/acctest/provisioneracc/builders.go b/packer-plugin-sdk/acctest/provisioneracc/builders.go index 32ebe1f75..3eb1e747b 100644 --- a/packer-plugin-sdk/acctest/provisioneracc/builders.go +++ b/packer-plugin-sdk/acctest/provisioneracc/builders.go @@ -1,9 +1,8 @@ /* -The provisioneracc package creates a framework for provisioner acceptance +Package provisioneracc creates a framework for provisioner acceptance testing. For builder acceptance testing, use the top level tooling in the acctest package. */ - package provisioneracc import ( diff --git a/packer-plugin-sdk/acctest/testutils/utils.go b/packer-plugin-sdk/acctest/testutils/utils.go index 3f466df1a..e8ab95031 100644 --- a/packer-plugin-sdk/acctest/testutils/utils.go +++ b/packer-plugin-sdk/acctest/testutils/utils.go @@ -1,3 +1,5 @@ +// Package testutils provides some simple ease-of-use tools for implementing +// acceptance testing. package testutils import "os" diff --git a/packer-plugin-sdk/adapter/doc.go b/packer-plugin-sdk/adapter/doc.go index 468d42a70..bf6254089 100644 --- a/packer-plugin-sdk/adapter/doc.go +++ b/packer-plugin-sdk/adapter/doc.go @@ -10,5 +10,4 @@ You may want to use this adapter if you are writing a provisioner that wraps a tool which under normal usage would be run locally and form a connection to the remote instance itself. */ - package adapter diff --git a/packer-plugin-sdk/bootcommand/doc.go b/packer-plugin-sdk/bootcommand/doc.go index 9a908528c..2bfa3d8bd 100644 --- a/packer-plugin-sdk/bootcommand/doc.go +++ b/packer-plugin-sdk/bootcommand/doc.go @@ -1,13 +1,10 @@ -/* -Package bootcommand generates and sends boot commands to the remote instance. - -This package is relevant to people who want to create new builders, particularly -builders with the capacity to build a VM from an iso. - -You can choose between three different drivers to send the command: a vnc -driver, a usb driver, and a PX-XT keyboard driver. The driver you choose will -depend on what kind of keyboard codes your hypervisor expects, and how you want -to implement the connection. -*/ - +// Package bootcommand generates and sends boot commands to the remote instance. +// +// This package is relevant to people who want to create new builders, particularly +// builders with the capacity to build a VM from an iso. +// +// You can choose between three different drivers to send the command: a vnc +// driver, a usb driver, and a PX-XT keyboard driver. The driver you choose will +// depend on what kind of keyboard codes your hypervisor expects, and how you want +// to implement the connection. package bootcommand diff --git a/packer-plugin-sdk/bootcommand/gen.go b/packer-plugin-sdk/bootcommand/gen.go index c5796e65e..f4e3fa964 100644 --- a/packer-plugin-sdk/bootcommand/gen.go +++ b/packer-plugin-sdk/bootcommand/gen.go @@ -1,3 +1,3 @@ -package bootcommand - //go:generate pigeon -o boot_command.go boot_command.pigeon + +package bootcommand diff --git a/packer-plugin-sdk/chroot/doc.go b/packer-plugin-sdk/chroot/doc.go index d433e0618..26e8259fb 100644 --- a/packer-plugin-sdk/chroot/doc.go +++ b/packer-plugin-sdk/chroot/doc.go @@ -21,5 +21,4 @@ The HashiCorp-maintained Amazon and Azure builder plugins have chroot builders which use this option and can serve as an example for how the chroot steps and communicator are used. */ - package chroot diff --git a/packer-plugin-sdk/common/command.go b/packer-plugin-sdk/common/command.go index cdc8f7b95..aa9d2d308 100644 --- a/packer-plugin-sdk/common/command.go +++ b/packer-plugin-sdk/common/command.go @@ -1,3 +1,8 @@ +// Package common provides the PackerConfig structure that gets passed to every +// plugin and contains information populated by the Packer core. This config +// contains data about command line flags that were used, as well as template +// information and information about the Packer core's version. It also +// proivdes string constants to use to access that config. package common import ( diff --git a/packer-plugin-sdk/communicator/comm_host.go b/packer-plugin-sdk/communicator/comm_host.go index 6c7e55eb5..2077f6a7b 100644 --- a/packer-plugin-sdk/communicator/comm_host.go +++ b/packer-plugin-sdk/communicator/comm_host.go @@ -7,7 +7,10 @@ import ( "github.com/hashicorp/packer/packer-plugin-sdk/multistep" ) -// Generic commHost function that should work for most cloud builders. +// CommHost determines the IP address of the cloud instance that Packer +// should connect to. A custom CommHost function can be implemented in each +// builder if need be; this is a generic function that should work for most +// cloud builders. func CommHost(host string, statebagKey string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { diff --git a/packer-plugin-sdk/communicator/config.go b/packer-plugin-sdk/communicator/config.go index d1342a60d..1d68e8120 100644 --- a/packer-plugin-sdk/communicator/config.go +++ b/packer-plugin-sdk/communicator/config.go @@ -24,8 +24,9 @@ import ( "golang.org/x/crypto/ssh/agent" ) -// Config is the common configuration that communicators allow within -// a builder. +// Config is the common configuration a builder uses to define and configure a Packer +// communicator. Embed this struct in your builder config to implement +// communicator support. type Config struct { // Packer currently supports three kinds of communicators: // @@ -59,6 +60,7 @@ type Config struct { WinRM `mapstructure:",squash"` } +// The SSH config defines configuration for the SSH communicator. type SSH struct { // The address to SSH to. This usually is automatically configured by the // builder. @@ -189,7 +191,7 @@ type SSH struct { } // When no ssh credentials are specified, Packer will generate a temporary SSH -// keypair for the instance, you can change the algorithm type and bits +// keypair for the instance. You can change the algorithm type and bits // settings. type SSHTemporaryKeyPair struct { // `dsa` | `ecdsa` | `ed25519` | `rsa` ( the default ) @@ -208,6 +210,7 @@ type SSHTemporaryKeyPair struct { SSHTemporaryKeyPairBits int `mapstructure:"temporary_key_pair_bits"` } +// The WinRM config defines configuration for the WinRM communicator. type WinRM struct { // The username to use to connect to WinRM. WinRMUser string `mapstructure:"winrm_username"` @@ -244,14 +247,19 @@ type WinRM struct { WinRMTransportDecorator func() winrm.Transporter } -func (c *SSH) ConfigSpec() hcldec.ObjectSpec { return c.FlatMapstructure().HCL2Spec() } +// The ConfigSpec funcs are used by the Packer core to parse HCL2 templates. +func (c *SSH) ConfigSpec() hcldec.ObjectSpec { return c.FlatMapstructure().HCL2Spec() } + +// The ConfigSpec funcs are used by the Packer core to parse HCL2 templates. func (c *WinRM) ConfigSpec() hcldec.ObjectSpec { return c.FlatMapstructure().HCL2Spec() } +// Configure parses the json template into the Config structs func (c *SSH) Configure(raws ...interface{}) ([]string, error) { err := config.Decode(c, nil, raws...) return nil, err } +// Configure parses the json template into the Config structs func (c *WinRM) Configure(raws ...interface{}) ([]string, error) { err := config.Decode(c, nil, raws...) return nil, err @@ -262,6 +270,8 @@ var ( _ packersdk.ConfigurableCommunicator = new(WinRM) ) +// SSHInterface defines whether to use public or private, addresses, and whether +// to use IPv4 or IPv6. type SSHInterface struct { // One of `public_ip`, `private_ip`, `public_dns`, or `private_dns`. If // set, either the public IP address, private IP address, public DNS name @@ -282,7 +292,7 @@ type SSHInterface struct { SSHIPVersion string `mapstructure:"ssh_ip_version"` } -// ReadSSHPrivateKeyFile returns the SSH private key bytes +// ReadSSHPrivateKeyFile returns the SSH private key bytes. func (c *Config) ReadSSHPrivateKeyFile() ([]byte, error) { var privateKey []byte diff --git a/packer-plugin-sdk/communicator/config.hcl2spec.go b/packer-plugin-sdk/communicator/config.hcl2spec.go index 106a140db..302f87a8c 100644 --- a/packer-plugin-sdk/communicator/config.hcl2spec.go +++ b/packer-plugin-sdk/communicator/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,SSH,WinRM,SSHTemporaryKeyPair"; DO NOT EDIT. + package communicator import ( diff --git a/packer-plugin-sdk/communicator/doc.go b/packer-plugin-sdk/communicator/doc.go new file mode 100644 index 000000000..e5990c9a6 --- /dev/null +++ b/packer-plugin-sdk/communicator/doc.go @@ -0,0 +1,10 @@ +/* +Package communicator provides common steps for connecting to an instance +using the Packer communicator. These steps can be implemented by builders. +Normally, a builder will want to implement StepConnect, which is smart enough +to then determine which kind of communicator, and therefore which kind of +substep, it should implement. + +Various helper functions are also supplied. +*/ +package communicator diff --git a/packer-plugin-sdk/communicator/ssh/ssh.go b/packer-plugin-sdk/communicator/ssh/ssh.go index b8635483a..9c330bc27 100644 --- a/packer-plugin-sdk/communicator/ssh/ssh.go +++ b/packer-plugin-sdk/communicator/ssh/ssh.go @@ -1,3 +1,5 @@ +// Package SSH provides tooling for generating a temporary SSH keypair, and +// provides tooling for connecting to an instance via a tunnel. package ssh import ( diff --git a/packer-plugin-sdk/filelock/doc.go b/packer-plugin-sdk/filelock/doc.go index 28a5c9ad6..0a89b5030 100644 --- a/packer-plugin-sdk/filelock/doc.go +++ b/packer-plugin-sdk/filelock/doc.go @@ -2,5 +2,4 @@ Package filelock makes it easy to create and check file locks for concurrent processes. */ - package filelock diff --git a/packer-plugin-sdk/guestexec/doc.go b/packer-plugin-sdk/guestexec/doc.go index 391ee5c29..fb9e6e8c4 100644 --- a/packer-plugin-sdk/guestexec/doc.go +++ b/packer-plugin-sdk/guestexec/doc.go @@ -8,5 +8,4 @@ Note that to successfully use this package your provisioner must have knowledge of the guest type, which is not information that builders generally collect -- your provisioner will have to require guest information in its config. */ - package guestexec diff --git a/packer-plugin-sdk/iochan/iochan.go b/packer-plugin-sdk/iochan/iochan.go deleted file mode 100644 index 59541ba4e..000000000 --- a/packer-plugin-sdk/iochan/iochan.go +++ /dev/null @@ -1,28 +0,0 @@ -package iochan - -import ( - "bufio" - "io" -) - -// LineReader takes an io.Reader and produces the contents of the reader on the -// returned channel. Internally bufio.NewScanner is used, io.ScanLines parses -// lines and returns them without carriage return. Scan can panic if the split -// function returns too many empty tokens without advancing the input. -// -// The channel will be closed either by reaching the end of the input or an -// error. -func LineReader(r io.Reader) <-chan string { - ch := make(chan string) - - go func() { - scanner := bufio.NewScanner(r) - defer close(ch) - - for scanner.Scan() { - ch <- scanner.Text() - } - }() - - return ch -} diff --git a/packer-plugin-sdk/iochan/iochan_test.go b/packer-plugin-sdk/iochan/iochan_test.go deleted file mode 100644 index a600aca0a..000000000 --- a/packer-plugin-sdk/iochan/iochan_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package iochan - -import ( - "bytes" - "reflect" - "strings" - "testing" -) - -func TestLineReader(t *testing.T) { - - data := []string{"foo", "bar", "baz"} - - buf := new(bytes.Buffer) - buf.WriteString(strings.Join(data, "\n") + "\n") - - ch := LineReader(buf) - - var result []string - expected := data - for v := range ch { - result = append(result, v) - } - - if !reflect.DeepEqual(result, expected) { - t.Fatalf("unexpected results: %#v", result) - } -} diff --git a/packer-plugin-sdk/json/unmarshal_test.go b/packer-plugin-sdk/json/unmarshal_test.go deleted file mode 100644 index a5b981cc6..000000000 --- a/packer-plugin-sdk/json/unmarshal_test.go +++ /dev/null @@ -1 +0,0 @@ -package json diff --git a/packer-plugin-sdk/multistep/commonsteps/doc.go b/packer-plugin-sdk/multistep/commonsteps/doc.go index b5b7e90af..d3f2717fe 100644 --- a/packer-plugin-sdk/multistep/commonsteps/doc.go +++ b/packer-plugin-sdk/multistep/commonsteps/doc.go @@ -12,5 +12,4 @@ provisioners to run inside your builder. While it is possible to create a simple builder without using the multistep runner or step_provision, your builder will lack core Packer functionality. */ - package commonsteps diff --git a/packer-plugin-sdk/multistep/doc.go b/packer-plugin-sdk/multistep/doc.go index 17570cda9..002069fc9 100644 --- a/packer-plugin-sdk/multistep/doc.go +++ b/packer-plugin-sdk/multistep/doc.go @@ -57,5 +57,4 @@ Value is 1 Value is 2 ``` */ - package multistep diff --git a/packer-plugin-sdk/net/configure_port.go b/packer-plugin-sdk/net/configure_port.go index 042dc13c2..16d830a02 100644 --- a/packer-plugin-sdk/net/configure_port.go +++ b/packer-plugin-sdk/net/configure_port.go @@ -1,3 +1,5 @@ +// Package net contains some helper wrapping functions for the http and net +// golang libraries that meet Packer-specific needs. package net import ( diff --git a/packer-plugin-sdk/packer/builder_mock.hcl2spec.go b/packer-plugin-sdk/packer/builder_mock.hcl2spec.go index bf726cf94..09ef22087 100644 --- a/packer-plugin-sdk/packer/builder_mock.hcl2spec.go +++ b/packer-plugin-sdk/packer/builder_mock.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type MockBuilder"; DO NOT EDIT. + package packer import ( diff --git a/packer-plugin-sdk/packer/communicator_test.go b/packer-plugin-sdk/packer/communicator_test.go index 40450e98e..e334d0d52 100644 --- a/packer-plugin-sdk/packer/communicator_test.go +++ b/packer-plugin-sdk/packer/communicator_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/packer/packer-plugin-sdk/iochan" + "github.com/mitchellh/iochan" "golang.org/x/sync/errgroup" ) @@ -42,8 +42,8 @@ func TestRemoteCmd_StartWithUi(t *testing.T) { testPrintFn := func(in io.Reader, expected []string) error { i := 0 got := []string{} - for output := range iochan.LineReader(in) { - got = append(got, output) + for output := range iochan.DelimReader(in, '\n') { + got = append(got, strings.TrimSpace(output)) i++ if i == len(expected) { // here ideally the LineReader chan should be closed, but since diff --git a/packer-plugin-sdk/packer/doc.go b/packer-plugin-sdk/packer/doc.go new file mode 100644 index 000000000..ada2bbd4c --- /dev/null +++ b/packer-plugin-sdk/packer/doc.go @@ -0,0 +1,21 @@ +/* +Package packer contains all of the interfaces for key Packer objects. + +This module will need to be imported by all but the very simplest plugins. It +represents the foundation of the API that the Core and Plugins use to +communicate with each other. + +Changes to any of the interfaces in this package likely represent a +backwards-incompatibility and should therefore only be made rarely and when +absolutely necessary. + +Plugins will need to implement either the Builder, Provisioner, +or Post-Processor interfaces, and will likely create an Artifact. The +Communicator must be implemented in the Builder and then passed into the +Provisioners so they can use it communicate with the instance without needing +to know the connection details. + +The UI is created by the Packer core for use by the plugins, and is how the +plugins stream information back to the terminal. +*/ +package packer diff --git a/packer-plugin-sdk/packer/provisioner_mock.hcl2spec.go b/packer-plugin-sdk/packer/provisioner_mock.hcl2spec.go index 80a13a940..6e319dd8f 100644 --- a/packer-plugin-sdk/packer/provisioner_mock.hcl2spec.go +++ b/packer-plugin-sdk/packer/provisioner_mock.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type MockProvisioner"; DO NOT EDIT. + package packer import ( diff --git a/packer-plugin-sdk/packerbuilderdata/generated_data.go b/packer-plugin-sdk/packerbuilderdata/generated_data.go index c8b986081..8361f69a0 100644 --- a/packer-plugin-sdk/packerbuilderdata/generated_data.go +++ b/packer-plugin-sdk/packerbuilderdata/generated_data.go @@ -1,3 +1,7 @@ +// Package packerbuilderdata provides tooling for setting and getting special +// builder-generated data that will be passed to the provisioners. This data +// should be limited to runtime data like instance id, ip address, and other +// relevant details that provisioning scripts may need access to. package packerbuilderdata import "github.com/hashicorp/packer/packer-plugin-sdk/multistep" diff --git a/packer-plugin-sdk/pathing/config_file.go b/packer-plugin-sdk/pathing/config_file.go index 98a320f2f..ee2ef52b7 100644 --- a/packer-plugin-sdk/pathing/config_file.go +++ b/packer-plugin-sdk/pathing/config_file.go @@ -1,3 +1,5 @@ +// Package pathing determines where to put the Packer config directory based on +// host OS architecture and user environment variables. package pathing import ( diff --git a/packer-plugin-sdk/random/string.go b/packer-plugin-sdk/random/string.go index bac4a355b..21c286532 100644 --- a/packer-plugin-sdk/random/string.go +++ b/packer-plugin-sdk/random/string.go @@ -1,3 +1,4 @@ +// Package random is a helper for generating random alphanumeric strings. package random import ( diff --git a/packer-plugin-sdk/retry/retry.go b/packer-plugin-sdk/retry/retry.go index 61e47050e..7b36f3c61 100644 --- a/packer-plugin-sdk/retry/retry.go +++ b/packer-plugin-sdk/retry/retry.go @@ -1,3 +1,5 @@ +// Package retry provides tooling to retry API calls which are known to be +// vulnerable to throttling or flakiness due to eventual consistency. package retry import ( diff --git a/packer-plugin-sdk/rpc/init.go b/packer-plugin-sdk/rpc/init.go index f08e76494..eeeb9e0c1 100644 --- a/packer-plugin-sdk/rpc/init.go +++ b/packer-plugin-sdk/rpc/init.go @@ -1,3 +1,9 @@ +/* +Package rpc contains the implementation of the remote procedure call code that +the Packer core uses to communicate with packer plugins. As a plugin maintainer, +you are unlikely to need to directly import or use this package, but it +underpins the packer server that all plugins must implement. +*/ package rpc import "encoding/gob" diff --git a/packer-plugin-sdk/sdk-internals/communicator/none/communicator.go b/packer-plugin-sdk/sdk-internals/communicator/none/communicator.go index 63780ac5a..1bc7b1f6b 100644 --- a/packer-plugin-sdk/sdk-internals/communicator/none/communicator.go +++ b/packer-plugin-sdk/sdk-internals/communicator/none/communicator.go @@ -1,3 +1,6 @@ +// Package none implements the 'none' communicator. Plugin maintainers should not +// import this package directly, instead using the tooling in the +// "packer-plugin-sdk/communicator" module. package none import ( diff --git a/packer-plugin-sdk/sdk-internals/communicator/ssh/communicator.go b/packer-plugin-sdk/sdk-internals/communicator/ssh/communicator.go index c351fd0c0..8746b7604 100644 --- a/packer-plugin-sdk/sdk-internals/communicator/ssh/communicator.go +++ b/packer-plugin-sdk/sdk-internals/communicator/ssh/communicator.go @@ -1,3 +1,6 @@ +// Package ssh implements the SSH communicator. Plugin maintainers should not +// import this package directly, instead using the tooling in the +// "packer-plugin-sdk/communicator" module. package ssh import ( diff --git a/packer-plugin-sdk/sdk-internals/communicator/winrm/communicator.go b/packer-plugin-sdk/sdk-internals/communicator/winrm/communicator.go index 6739e1957..7da382be9 100644 --- a/packer-plugin-sdk/sdk-internals/communicator/winrm/communicator.go +++ b/packer-plugin-sdk/sdk-internals/communicator/winrm/communicator.go @@ -1,3 +1,6 @@ +// Package winrm implements the WinRM communicator. Plugin maintainers should not +// import this package directly, instead using the tooling in the +// "packer-plugin-sdk/communicator" module. package winrm import ( diff --git a/packer-plugin-sdk/shell-local/config.hcl2spec.go b/packer-plugin-sdk/shell-local/config.hcl2spec.go index 670cfde83..33b1265d5 100644 --- a/packer-plugin-sdk/shell-local/config.hcl2spec.go +++ b/packer-plugin-sdk/shell-local/config.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package shell_local import ( diff --git a/packer-plugin-sdk/shell-local/doc.go b/packer-plugin-sdk/shell-local/doc.go index a27dec1fe..1c7a21ead 100644 --- a/packer-plugin-sdk/shell-local/doc.go +++ b/packer-plugin-sdk/shell-local/doc.go @@ -5,10 +5,10 @@ relevant to plugin maintainers, as they are implementation details shared between the HashiCorp-maintained shell-local provisioner and shell-local post-processor. -The localexec sub-package can be used in any plugins that need local shell -access, whether that is in a driver for a hypervisor, or a command to a third -party cli tool. Please make sure that any third party tool dependencies are -noted in your plugin's documentation. +However, the localexec sub-package can be used in any plugins that need local +shell access, whether that is in a driver for a hypervisor, or a command to a +third party cli tool. Please make sure that any third party tool dependencies +are noted in your plugin's documentation. */ package shell_local diff --git a/packer-plugin-sdk/shell-local/localexec/run_and_stream.go b/packer-plugin-sdk/shell-local/localexec/run_and_stream.go index 9555d2660..81e6af526 100644 --- a/packer-plugin-sdk/shell-local/localexec/run_and_stream.go +++ b/packer-plugin-sdk/shell-local/localexec/run_and_stream.go @@ -10,8 +10,8 @@ import ( "sync" "syscall" - "github.com/hashicorp/packer/packer-plugin-sdk/iochan" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" + "github.com/mitchellh/iochan" ) // RunAndStream allows you to run a local command and stream output to the UI. @@ -39,8 +39,8 @@ func RunAndStream(cmd *exec.Cmd, ui packersdk.Ui, sensitive []string) error { // Create the channels we'll use for data exitCh := make(chan int, 1) - stdoutCh := iochan.LineReader(stdout_r) - stderrCh := iochan.LineReader(stderr_r) + stdoutCh := iochan.DelimReader(stdout_r, '\n') + stderrCh := iochan.DelimReader(stderr_r, '\n') // Start the goroutine to watch for the exit go func() { diff --git a/packer-plugin-sdk/shell/shell.go b/packer-plugin-sdk/shell/shell.go index 6aa03dfb0..13a85a365 100644 --- a/packer-plugin-sdk/shell/shell.go +++ b/packer-plugin-sdk/shell/shell.go @@ -1,4 +1,8 @@ -// Package shell defines code that is common in shells +// Package shell defines configuration fields that are common to many different +// kinds of shell. For example, this common configuration is imported by the +// "shell", "shell-local", and "powershell" provisioners. This provides +// consistency in the user experience and prevents provisioner maintainers from +// having to reimplement common useful functions across various environments. package shell import "github.com/hashicorp/packer/packer-plugin-sdk/common" diff --git a/packer-plugin-sdk/shutdowncommand/config.go b/packer-plugin-sdk/shutdowncommand/config.go index 108b56d85..a6f5e51a7 100644 --- a/packer-plugin-sdk/shutdowncommand/config.go +++ b/packer-plugin-sdk/shutdowncommand/config.go @@ -1,5 +1,6 @@ //go:generate struct-markdown +//Package shutdowncommand is a helper module for builder plugin configuration. package shutdowncommand import ( @@ -9,7 +10,8 @@ import ( ) // ShutdownConfig defines implementation details for shutting down a VM once it -// is done provisioned. +// is done being provisioned. +// // It is provided as a convenience to encourage builder developers to // consider implementing these options, which we believe are valuable for all // builders. It also helps guarantee that option names for similar options diff --git a/packer-plugin-sdk/template/config/custom_types.hcl2spec.go b/packer-plugin-sdk/template/config/custom_types.hcl2spec.go index 6d78cda43..d438b16f0 100644 --- a/packer-plugin-sdk/template/config/custom_types.hcl2spec.go +++ b/packer-plugin-sdk/template/config/custom_types.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type KeyValue,KeyValues,KeyValueFilter,NameValue,NameValues,NameValueFilter"; DO NOT EDIT. + package config import ( diff --git a/packer-plugin-sdk/template/doc.go b/packer-plugin-sdk/template/doc.go new file mode 100644 index 000000000..355460e5b --- /dev/null +++ b/packer-plugin-sdk/template/doc.go @@ -0,0 +1,44 @@ +/* +Package template helps plugins parse the Packer template into golang structures. + +This package should be imported and used by all plugins. It implements the +golang template engines that Packer documentes on its website, along with input +validation, custom type decoding, and template variable interpolation. + +A simple usage example that defines a config and then unpacks a user-provided +json template into the provided config: + + import ( + // ... + "github.com/hashicorp/packer-plugin-sdk/template/config" + "github.com/hashicorp/packer-plugin-sdk/template/interpolate" + ) + + type Config struct { + Field1 string `mapstructure:"field_1"` + Field2 bool `mapstructure:"field_2"` + Field3 bool `mapstructure:"field_3"` + + ctx interpolate.Context + } + + type Provisioner struct { + config Config + } + + func (p *CommentProvisioner) Prepare(raws ...interface{}) error { + err := config.Decode(&p.config, &config.DecodeOpts{ + Interpolate: true, + InterpolateContext: &p.config.ctx, + }, raws...) + if err != nil { + return err + } + + return nil + } + +More implementation details for plugins can be found in the +[extending packer](https://www.packer.io/docs/extending) section of the website. +*/ +package template diff --git a/packer-plugin-sdk/template/template.hcl2spec.go b/packer-plugin-sdk/template/template.hcl2spec.go index 6be7b93e7..0eb054099 100644 --- a/packer-plugin-sdk/template/template.hcl2spec.go +++ b/packer-plugin-sdk/template/template.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Provisioner"; DO NOT EDIT. + package template import ( diff --git a/packer-plugin-sdk/useragent/useragent.go b/packer-plugin-sdk/useragent/useragent.go index 12f9facd5..bbb72f47b 100644 --- a/packer-plugin-sdk/useragent/useragent.go +++ b/packer-plugin-sdk/useragent/useragent.go @@ -1,3 +1,5 @@ +// Package useragent creates a user agent for builders to use when calling out +// to cloud APIs or other addresses. package useragent import ( diff --git a/packer-plugin-sdk/uuid/uuid.go b/packer-plugin-sdk/uuid/uuid.go index d8b9830be..bf5d922ab 100644 --- a/packer-plugin-sdk/uuid/uuid.go +++ b/packer-plugin-sdk/uuid/uuid.go @@ -1,3 +1,4 @@ +// Package uuid provides helper functions for creating time-ordered UUIDs. package uuid import ( diff --git a/packer-plugin-sdk/version/version.go b/packer-plugin-sdk/version/version.go index a7f312a42..345530638 100644 --- a/packer-plugin-sdk/version/version.go +++ b/packer-plugin-sdk/version/version.go @@ -1,5 +1,5 @@ -// Version helps plugin creators set and track the plugin version using the same -// convenience functions used by the Packer core. +// Package version helps plugin creators set and track the plugin version using +// the same convenience functions used by the Packer core. package version import ( diff --git a/packer/post_processor_mock.hcl2spec.go b/packer/post_processor_mock.hcl2spec.go index 598483bf9..2e9c56ad3 100644 --- a/packer/post_processor_mock.hcl2spec.go +++ b/packer/post_processor_mock.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type MockPostProcessor"; DO NOT EDIT. + package packer import ( diff --git a/post-processor/alicloud-import/post-processor.hcl2spec.go b/post-processor/alicloud-import/post-processor.hcl2spec.go index 2a3292281..37d95572b 100644 --- a/post-processor/alicloud-import/post-processor.hcl2spec.go +++ b/post-processor/alicloud-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package alicloudimport import ( diff --git a/post-processor/amazon-import/post-processor.hcl2spec.go b/post-processor/amazon-import/post-processor.hcl2spec.go index 511792187..f8ae6ad76 100644 --- a/post-processor/amazon-import/post-processor.hcl2spec.go +++ b/post-processor/amazon-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package amazonimport import ( diff --git a/post-processor/artifice/post-processor.hcl2spec.go b/post-processor/artifice/post-processor.hcl2spec.go index d12ec0386..350c60723 100644 --- a/post-processor/artifice/post-processor.hcl2spec.go +++ b/post-processor/artifice/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package artifice import ( diff --git a/post-processor/checksum/post-processor.hcl2spec.go b/post-processor/checksum/post-processor.hcl2spec.go index f9cf480fc..80955fcb5 100644 --- a/post-processor/checksum/post-processor.hcl2spec.go +++ b/post-processor/checksum/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package checksum import ( diff --git a/post-processor/compress/post-processor.hcl2spec.go b/post-processor/compress/post-processor.hcl2spec.go index b03a4539e..bee3d6c56 100644 --- a/post-processor/compress/post-processor.hcl2spec.go +++ b/post-processor/compress/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package compress import ( diff --git a/post-processor/digitalocean-import/post-processor.hcl2spec.go b/post-processor/digitalocean-import/post-processor.hcl2spec.go index 502598bb8..3a41fe43b 100644 --- a/post-processor/digitalocean-import/post-processor.hcl2spec.go +++ b/post-processor/digitalocean-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package digitaloceanimport import ( diff --git a/post-processor/docker-import/post-processor.hcl2spec.go b/post-processor/docker-import/post-processor.hcl2spec.go index c037be3b3..02d0f0e13 100644 --- a/post-processor/docker-import/post-processor.hcl2spec.go +++ b/post-processor/docker-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package dockerimport import ( diff --git a/post-processor/docker-push/post-processor.hcl2spec.go b/post-processor/docker-push/post-processor.hcl2spec.go index 39c4778ba..9ff9fd0c3 100644 --- a/post-processor/docker-push/post-processor.hcl2spec.go +++ b/post-processor/docker-push/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package dockerpush import ( diff --git a/post-processor/docker-save/post-processor.hcl2spec.go b/post-processor/docker-save/post-processor.hcl2spec.go index 7dbb665b3..5abf3e78c 100644 --- a/post-processor/docker-save/post-processor.hcl2spec.go +++ b/post-processor/docker-save/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package dockersave import ( diff --git a/post-processor/docker-tag/post-processor.hcl2spec.go b/post-processor/docker-tag/post-processor.hcl2spec.go index 03d91f522..3f2a092be 100644 --- a/post-processor/docker-tag/post-processor.hcl2spec.go +++ b/post-processor/docker-tag/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package dockertag import ( diff --git a/post-processor/exoscale-import/post-processor.hcl2spec.go b/post-processor/exoscale-import/post-processor.hcl2spec.go index 1143cd7ca..e10719ab4 100644 --- a/post-processor/exoscale-import/post-processor.hcl2spec.go +++ b/post-processor/exoscale-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package exoscaleimport import ( diff --git a/post-processor/googlecompute-export/post-processor.hcl2spec.go b/post-processor/googlecompute-export/post-processor.hcl2spec.go index 5fb383954..569764682 100644 --- a/post-processor/googlecompute-export/post-processor.hcl2spec.go +++ b/post-processor/googlecompute-export/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package googlecomputeexport import ( diff --git a/post-processor/googlecompute-import/post-processor.hcl2spec.go b/post-processor/googlecompute-import/post-processor.hcl2spec.go index 2c0a726d2..151a9c628 100644 --- a/post-processor/googlecompute-import/post-processor.hcl2spec.go +++ b/post-processor/googlecompute-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package googlecomputeimport import ( diff --git a/post-processor/manifest/post-processor.hcl2spec.go b/post-processor/manifest/post-processor.hcl2spec.go index 6559621a6..fd50620dd 100644 --- a/post-processor/manifest/post-processor.hcl2spec.go +++ b/post-processor/manifest/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package manifest import ( diff --git a/post-processor/ucloud-import/post-processor.hcl2spec.go b/post-processor/ucloud-import/post-processor.hcl2spec.go index f20f2ca96..bcb5b4538 100644 --- a/post-processor/ucloud-import/post-processor.hcl2spec.go +++ b/post-processor/ucloud-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package ucloudimport import ( diff --git a/post-processor/vagrant-cloud/post-processor.hcl2spec.go b/post-processor/vagrant-cloud/post-processor.hcl2spec.go index 4fe3592e9..df52bd8f7 100644 --- a/post-processor/vagrant-cloud/post-processor.hcl2spec.go +++ b/post-processor/vagrant-cloud/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vagrantcloud import ( diff --git a/post-processor/vagrant/post-processor.hcl2spec.go b/post-processor/vagrant/post-processor.hcl2spec.go index 0d0b6f424..7ac8a8352 100644 --- a/post-processor/vagrant/post-processor.hcl2spec.go +++ b/post-processor/vagrant/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vagrant import ( diff --git a/post-processor/vsphere-template/post-processor.hcl2spec.go b/post-processor/vsphere-template/post-processor.hcl2spec.go index 2b4de4334..214568087 100644 --- a/post-processor/vsphere-template/post-processor.hcl2spec.go +++ b/post-processor/vsphere-template/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vsphere_template import ( diff --git a/post-processor/vsphere/post-processor.hcl2spec.go b/post-processor/vsphere/post-processor.hcl2spec.go index 57c1199fe..da4d82973 100644 --- a/post-processor/vsphere/post-processor.hcl2spec.go +++ b/post-processor/vsphere/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package vsphere import ( diff --git a/post-processor/yandex-export/post-processor.hcl2spec.go b/post-processor/yandex-export/post-processor.hcl2spec.go index 93fafefed..e0a2a1a26 100644 --- a/post-processor/yandex-export/post-processor.hcl2spec.go +++ b/post-processor/yandex-export/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package yandexexport import ( diff --git a/post-processor/yandex-import/post-processor.hcl2spec.go b/post-processor/yandex-import/post-processor.hcl2spec.go index 1e50916d1..21784ed56 100644 --- a/post-processor/yandex-import/post-processor.hcl2spec.go +++ b/post-processor/yandex-import/post-processor.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package yandeximport import ( diff --git a/provisioner/ansible-local/provisioner.hcl2spec.go b/provisioner/ansible-local/provisioner.hcl2spec.go index fc22fd467..da3d39bef 100644 --- a/provisioner/ansible-local/provisioner.hcl2spec.go +++ b/provisioner/ansible-local/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package ansiblelocal import ( diff --git a/provisioner/ansible/provisioner.hcl2spec.go b/provisioner/ansible/provisioner.hcl2spec.go index 7d2d08079..b2ea7fd85 100644 --- a/provisioner/ansible/provisioner.hcl2spec.go +++ b/provisioner/ansible/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package ansible import ( diff --git a/provisioner/azure-dtlartifact/provisioner.hcl2spec.go b/provisioner/azure-dtlartifact/provisioner.hcl2spec.go index 9e89ae8ef..95601f797 100644 --- a/provisioner/azure-dtlartifact/provisioner.hcl2spec.go +++ b/provisioner/azure-dtlartifact/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,DtlArtifact,ArtifactParameter"; DO NOT EDIT. + package devtestlabsartifacts import ( diff --git a/provisioner/breakpoint/provisioner.hcl2spec.go b/provisioner/breakpoint/provisioner.hcl2spec.go index 080aee8f4..fd66e84df 100644 --- a/provisioner/breakpoint/provisioner.hcl2spec.go +++ b/provisioner/breakpoint/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package breakpoint import ( diff --git a/provisioner/chef-client/provisioner.hcl2spec.go b/provisioner/chef-client/provisioner.hcl2spec.go index 6d961e9a9..47d7f994b 100644 --- a/provisioner/chef-client/provisioner.hcl2spec.go +++ b/provisioner/chef-client/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package chefclient import ( diff --git a/provisioner/chef-solo/provisioner.hcl2spec.go b/provisioner/chef-solo/provisioner.hcl2spec.go index f886339a2..951cda0a2 100644 --- a/provisioner/chef-solo/provisioner.hcl2spec.go +++ b/provisioner/chef-solo/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package chefsolo import ( diff --git a/provisioner/converge/provisioner.hcl2spec.go b/provisioner/converge/provisioner.hcl2spec.go index 295f4616c..216e5dbda 100644 --- a/provisioner/converge/provisioner.hcl2spec.go +++ b/provisioner/converge/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config,ModuleDir"; DO NOT EDIT. + package converge import ( diff --git a/provisioner/file/provisioner.hcl2spec.go b/provisioner/file/provisioner.hcl2spec.go index 2b0372176..80ae6cb05 100644 --- a/provisioner/file/provisioner.hcl2spec.go +++ b/provisioner/file/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package file import ( diff --git a/provisioner/inspec/provisioner.hcl2spec.go b/provisioner/inspec/provisioner.hcl2spec.go index c7942d885..9633bc5b8 100644 --- a/provisioner/inspec/provisioner.hcl2spec.go +++ b/provisioner/inspec/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package inspec import ( diff --git a/provisioner/powershell/provisioner.hcl2spec.go b/provisioner/powershell/provisioner.hcl2spec.go index 3e12e7504..811d14048 100644 --- a/provisioner/powershell/provisioner.hcl2spec.go +++ b/provisioner/powershell/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package powershell import ( diff --git a/provisioner/puppet-masterless/provisioner.hcl2spec.go b/provisioner/puppet-masterless/provisioner.hcl2spec.go index 8659f021a..58a759e08 100644 --- a/provisioner/puppet-masterless/provisioner.hcl2spec.go +++ b/provisioner/puppet-masterless/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package puppetmasterless import ( diff --git a/provisioner/puppet-server/provisioner.hcl2spec.go b/provisioner/puppet-server/provisioner.hcl2spec.go index 18af2fc8e..fa232211f 100644 --- a/provisioner/puppet-server/provisioner.hcl2spec.go +++ b/provisioner/puppet-server/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package puppetserver import ( diff --git a/provisioner/salt-masterless/provisioner.hcl2spec.go b/provisioner/salt-masterless/provisioner.hcl2spec.go index 4fe5313e8..ddafc2abb 100644 --- a/provisioner/salt-masterless/provisioner.hcl2spec.go +++ b/provisioner/salt-masterless/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package saltmasterless import ( diff --git a/provisioner/shell/provisioner.hcl2spec.go b/provisioner/shell/provisioner.hcl2spec.go index 1609f541c..8356f6ce9 100644 --- a/provisioner/shell/provisioner.hcl2spec.go +++ b/provisioner/shell/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package shell import ( diff --git a/provisioner/sleep/provisioner.hcl2spec.go b/provisioner/sleep/provisioner.hcl2spec.go index 1a1ab2760..86a4f9328 100644 --- a/provisioner/sleep/provisioner.hcl2spec.go +++ b/provisioner/sleep/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Provisioner"; DO NOT EDIT. + package sleep import ( diff --git a/provisioner/windows-restart/provisioner.hcl2spec.go b/provisioner/windows-restart/provisioner.hcl2spec.go index ad6434b2c..c5a2ff06b 100644 --- a/provisioner/windows-restart/provisioner.hcl2spec.go +++ b/provisioner/windows-restart/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package restart import ( diff --git a/provisioner/windows-shell/provisioner.hcl2spec.go b/provisioner/windows-shell/provisioner.hcl2spec.go index 49510297e..dcf67124a 100644 --- a/provisioner/windows-shell/provisioner.hcl2spec.go +++ b/provisioner/windows-shell/provisioner.hcl2spec.go @@ -1,4 +1,5 @@ // Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT. + package shell import ( diff --git a/website/content/partials/packer-plugin-sdk/communicator/Config.mdx b/website/content/partials/packer-plugin-sdk/communicator/Config.mdx index e030bbcd1..8d268582f 100644 --- a/website/content/partials/packer-plugin-sdk/communicator/Config.mdx +++ b/website/content/partials/packer-plugin-sdk/communicator/Config.mdx @@ -1,4 +1,5 @@ -Config is the common configuration that communicators allow within -a builder. +Config is the common a builder uses to define and configure a Packer +communicator. Embed this struct in your builder config to implement +communicator support. diff --git a/website/content/partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair.mdx b/website/content/partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair.mdx index 90caf4de1..da04d8043 100644 --- a/website/content/partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair.mdx +++ b/website/content/partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair.mdx @@ -1,5 +1,5 @@ When no ssh credentials are specified, Packer will generate a temporary SSH -keypair for the instance, you can change the algorithm type and bits +keypair for the instance. You can change the algorithm type and bits settings.