This follows #8232 which added the code to generate the code required to parse HCL files for each packer component. All old config files of packer will keep on working the same. Packer takes one argument. When a directory is passed, all files in the folder with a name ending with “.pkr.hcl” or “.pkr.json” will be parsed using the HCL2 format. When a file ending with “.pkr.hcl” or “.pkr.json” is passed it will be parsed using the HCL2 format. For every other case; the old packer style will be used. ## 1. the hcl2template pkg can create a packer.Build from a set of HCL (v2) files I had to make the packer.coreBuild (which is our one and only packer.Build ) a public struct with public fields ## 2. Components interfaces get a new ConfigSpec Method to read a file from an HCL file. This is a breaking change for packer plugins. a packer component can be a: builder/provisioner/post-processor each component interface now gets a `ConfigSpec() hcldec.ObjectSpec` which allows packer to tell what is the layout of the hcl2 config meant to configure that specific component. This ObjectSpec is sent through the wire (RPC) and a cty.Value is now sent through the already existing configuration entrypoints: Provisioner.Prepare(raws ...interface{}) error Builder.Prepare(raws ...interface{}) ([]string, error) PostProcessor.Configure(raws ...interface{}) error close #1768 Example hcl files: ```hcl // file amazon-ebs-kms-key/run.pkr.hcl build { sources = [ "source.amazon-ebs.first", ] provisioner "shell" { inline = [ "sleep 5" ] } post-processor "shell-local" { inline = [ "sleep 5" ] } } // amazon-ebs-kms-key/source.pkr.hcl source "amazon-ebs" "first" { ami_name = "hcl2-test" region = "us-east-1" instance_type = "t2.micro" kms_key_id = "c729958f-c6ba-44cd-ab39-35ab68ce0a6c" encrypt_boot = true source_ami_filter { filters { virtualization-type = "hvm" name = "amzn-ami-hvm-????.??.?.????????-x86_64-gp2" root-device-type = "ebs" } most_recent = true owners = ["amazon"] } launch_block_device_mappings { device_name = "/dev/xvda" volume_size = 20 volume_type = "gp2" delete_on_termination = "true" } launch_block_device_mappings { device_name = "/dev/xvdf" volume_size = 500 volume_type = "gp2" delete_on_termination = true encrypted = true } ami_regions = ["eu-central-1"] run_tags { Name = "packer-solr-something" stack-name = "DevOps Tools" } communicator = "ssh" ssh_pty = true ssh_username = "ec2-user" associate_public_ip_address = true } ```
189 lines
10 KiB
Modula-2
189 lines
10 KiB
Modula-2
module github.com/hashicorp/packer
|
|
|
|
require (
|
|
cloud.google.com/go v0.49.0 // indirect
|
|
cloud.google.com/go/bigquery v1.3.0 // indirect
|
|
cloud.google.com/go/pubsub v1.1.0 // indirect
|
|
cloud.google.com/go/storage v1.4.0 // indirect
|
|
contrib.go.opencensus.io/exporter/ocagent v0.5.0 // indirect
|
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20191203043605-d42048ed14fd // indirect
|
|
github.com/1and1/oneandone-cloudserver-sdk-go v1.0.1
|
|
github.com/Azure/azure-sdk-for-go v30.0.0+incompatible
|
|
github.com/Azure/go-autorest v12.0.0+incompatible
|
|
github.com/Azure/go-ntlmssp v0.0.0-20191115201650-bad6df29494a // indirect
|
|
github.com/ChrisTrenkamp/goxpath v0.0.0-20170625215350-4fe035839290
|
|
github.com/NaverCloudPlatform/ncloud-sdk-go v0.0.0-20180110055012-c2e73f942591
|
|
github.com/PuerkitoBio/goquery v1.5.0 // indirect
|
|
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
|
|
github.com/Telmate/proxmox-api-go v0.0.0-20191015171801-b0c2796b9fcf
|
|
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af // indirect
|
|
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190418113227-25233c783f4e
|
|
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f
|
|
github.com/antchfx/htmlquery v1.0.0 // indirect
|
|
github.com/antchfx/xmlquery v1.0.0 // indirect
|
|
|
|
github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd // indirect
|
|
github.com/antchfx/xquery v0.0.0-20170730121040-eb8c3c172607 // indirect
|
|
github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43
|
|
github.com/armon/go-radix v1.0.0 // indirect
|
|
github.com/aws/aws-sdk-go v1.24.1
|
|
github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3
|
|
github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae
|
|
github.com/cheggaaa/pb v1.0.27
|
|
github.com/chzyer/logex v1.1.10 // indirect
|
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
|
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect
|
|
github.com/creack/goselect v0.1.0 // indirect
|
|
github.com/creack/pty v1.1.9 // indirect
|
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
|
github.com/digitalocean/go-libvirt v0.0.0-20190626172931-4d226dd6c437 // indirect
|
|
github.com/digitalocean/go-qemu v0.0.0-20181112162955-dd7bb9c771b8
|
|
github.com/digitalocean/godo v1.11.1
|
|
github.com/dimchansky/utfbom v1.1.0 // indirect
|
|
github.com/dnaeon/go-vcr v1.0.0 // indirect
|
|
github.com/docker/docker v0.0.0-20180422163414-57142e89befe // indirect
|
|
github.com/dustin/go-humanize v1.0.0 // indirect
|
|
github.com/dylanmei/iso8601 v0.1.0 // indirect
|
|
github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08
|
|
github.com/envoyproxy/go-control-plane v0.9.1 // indirect
|
|
github.com/exoscale/egoscale v0.18.1
|
|
github.com/fatih/camelcase v1.0.0
|
|
github.com/fatih/structtag v1.0.0
|
|
github.com/go-ini/ini v1.25.4
|
|
github.com/go-ole/go-ole v1.2.4 // indirect
|
|
github.com/gobwas/glob v0.2.3 // indirect
|
|
github.com/gocolly/colly v1.2.0
|
|
github.com/gofrs/flock v0.7.1
|
|
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
|
|
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
|
|
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
|
|
github.com/google/go-cmp v0.3.1
|
|
github.com/google/go-querystring v1.0.0 // indirect
|
|
github.com/google/pprof v0.0.0-20191105193234-27840fff0d09 // indirect
|
|
github.com/google/shlex v0.0.0-20150127133951-6f45313302b9
|
|
github.com/google/uuid v1.0.0
|
|
github.com/gophercloud/gophercloud v0.2.0
|
|
github.com/gophercloud/utils v0.0.0-20190124192022-a5c25e7a53a6
|
|
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
|
|
github.com/gorilla/websocket v0.0.0-20170319172727-a91eba7f9777 // indirect
|
|
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
|
|
github.com/hashicorp/consul v1.4.0
|
|
github.com/hashicorp/errwrap v1.0.0
|
|
github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de
|
|
github.com/hashicorp/go-cleanhttp v0.5.0
|
|
github.com/hashicorp/go-getter v1.3.1-0.20190906090232-a0f878cb75da
|
|
github.com/hashicorp/go-multierror v1.0.0
|
|
github.com/hashicorp/go-oracle-terraform v0.0.0-20181016190316-007121241b79
|
|
github.com/hashicorp/go-retryablehttp v0.5.2 // indirect
|
|
github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 // indirect
|
|
github.com/hashicorp/go-uuid v1.0.1
|
|
github.com/hashicorp/go-version v1.2.0
|
|
github.com/hashicorp/golang-lru v0.5.3 // indirect
|
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
|
github.com/hashicorp/hcl/v2 v2.0.0
|
|
github.com/hashicorp/hcl2 v0.0.0-20191002203319-fb75b3253c80
|
|
github.com/hashicorp/serf v0.8.2 // indirect
|
|
github.com/hashicorp/vault v1.1.0
|
|
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
|
|
github.com/hetznercloud/hcloud-go v1.15.1
|
|
github.com/hyperonecom/h1-client-go v0.0.0-20191203060043-b46280e4c4a4
|
|
github.com/jdcloud-api/jdcloud-sdk-go v1.9.1-0.20190605102154-3d81a50ca961
|
|
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869
|
|
github.com/joyent/triton-go v0.0.0-20180116165742-545edbe0d564
|
|
github.com/json-iterator/go v1.1.6 // indirect
|
|
github.com/jstemmer/go-junit-report v0.9.1 // indirect
|
|
github.com/jtolds/gls v4.2.1+incompatible // indirect
|
|
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1
|
|
github.com/kennygrant/sanitize v1.2.4 // indirect
|
|
github.com/klauspost/compress v0.0.0-20160131094358-f86d2e6d8a77 // indirect
|
|
github.com/klauspost/cpuid v0.0.0-20160106104451-349c67577817 // indirect
|
|
github.com/klauspost/crc32 v0.0.0-20160114101742-999f3125931f // indirect
|
|
github.com/klauspost/pgzip v0.0.0-20151221113845-47f36e165cec
|
|
github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169 // indirect
|
|
github.com/kr/pty v1.1.8 // indirect
|
|
github.com/linode/linodego v0.7.1
|
|
github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c // indirect
|
|
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect
|
|
github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939
|
|
github.com/mattn/go-isatty v0.0.10 // indirect
|
|
github.com/mattn/go-tty v0.0.0-20191112051231-74040eebce08
|
|
github.com/miekg/dns v1.1.1 // indirect
|
|
github.com/mitchellh/cli v1.0.0
|
|
github.com/mitchellh/go-fs v0.0.0-20180402234041-7b48fa161ea7
|
|
github.com/mitchellh/go-homedir v1.0.0
|
|
github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed
|
|
github.com/mitchellh/gox v1.0.1 // indirect
|
|
github.com/mitchellh/iochan v1.0.0
|
|
github.com/mitchellh/mapstructure v0.0.0-20180111000720-b4575eea38cc
|
|
github.com/mitchellh/panicwrap v0.0.0-20170106182340-fce601fe5557
|
|
github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784
|
|
github.com/mitchellh/reflectwalk v1.0.0
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.1 // indirect
|
|
github.com/moul/anonuuid v0.0.0-20160222162117-609b752a95ef // indirect
|
|
github.com/moul/gotty-client v0.0.0-20180327180212-b26a57ebc215 // indirect
|
|
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 // indirect
|
|
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
|
|
github.com/olekukonko/tablewriter v0.0.0-20180105111133-96aac992fc8b
|
|
github.com/oracle/oci-go-sdk v1.8.0
|
|
github.com/outscale/osc-go v0.0.1
|
|
github.com/packer-community/winrmcp v0.0.0-20180921204643-0fd363d6159a
|
|
github.com/pierrec/lz4 v2.0.5+incompatible
|
|
github.com/pkg/errors v0.8.1
|
|
github.com/pkg/sftp v0.0.0-20160118190721-e84cc8c755ca
|
|
github.com/posener/complete v1.1.1
|
|
github.com/profitbricks/profitbricks-sdk-go v4.0.2+incompatible
|
|
github.com/prometheus/client_model v0.0.0-20191202183732-d1d2010b5bee // indirect
|
|
github.com/renstrom/fuzzysearch v0.0.0-20160331204855-2d205ac6ec17 // indirect
|
|
github.com/rogpeppe/go-internal v1.5.0 // indirect
|
|
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 // indirect
|
|
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
|
|
github.com/satori/go.uuid v1.2.0 // indirect
|
|
github.com/scaleway/scaleway-cli v0.0.0-20180921094345-7b12c9699d70
|
|
github.com/shirou/gopsutil v2.18.12+incompatible
|
|
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
|
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
|
|
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
|
|
github.com/stretchr/objx v0.2.0 // indirect
|
|
github.com/stretchr/testify v1.4.0
|
|
github.com/temoto/robotstxt v1.1.1 // indirect
|
|
github.com/tencentcloud/tencentcloud-sdk-go v3.0.97+incompatible
|
|
github.com/ucloud/ucloud-sdk-go v0.12.0
|
|
github.com/ufilesdk-dev/ufile-gosdk v0.0.0-20190830075812-b4dbc4ef43a6
|
|
github.com/ugorji/go v0.0.0-20151218193438-646ae4a518c1
|
|
github.com/ulikunitz/xz v0.5.5
|
|
github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311
|
|
github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0
|
|
github.com/yandex-cloud/go-genproto v0.0.0-20190916101622-7617782d381e
|
|
github.com/yandex-cloud/go-sdk v0.0.0-20190916101744-c781afa45829
|
|
github.com/zclconf/go-cty v1.1.2-0.20191126233707-f0f7fd24c4af
|
|
go.opencensus.io v0.22.2 // indirect
|
|
golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e
|
|
golang.org/x/exp v0.0.0-20191129062945-2f5052295587 // indirect
|
|
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect
|
|
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect
|
|
golang.org/x/mobile v0.0.0-20191130191448-5c0e7e404af8 // indirect
|
|
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933
|
|
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
|
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
|
|
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
|
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
|
|
golang.org/x/tools v0.0.0-20191203051722-db047d72ee39
|
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
|
|
google.golang.org/api v0.14.0
|
|
google.golang.org/appengine v1.6.5 // indirect
|
|
google.golang.org/genproto v0.0.0-20191115221424-83cc0476cb11 // indirect
|
|
google.golang.org/grpc v1.25.1
|
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
|
gopkg.in/h2non/gock.v1 v1.0.12 // indirect
|
|
gopkg.in/ini.v1 v1.42.0 // indirect
|
|
gopkg.in/jarcoal/httpmock.v1 v1.0.0-20181117152235-275e9df93516 // indirect
|
|
gopkg.in/yaml.v2 v2.2.7 // indirect
|
|
)
|
|
|
|
replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
|
|
|
|
replace github.com/gofrs/flock => github.com/azr/flock v0.0.0-20190823144736-958d66434653
|
|
|
|
go 1.13
|