Paul Meyer
977ca5be1c
Add StepCopyFiles and StepChrootProvision
2019-10-15 21:13:37 +00:00
Paul Meyer
9a3e6661b1
Add StepMountExtra
2019-10-15 21:13:37 +00:00
Paul Meyer
addbdedea9
Add StepPostMountCommands
2019-10-15 21:13:37 +00:00
Paul Meyer
d1f8b8545d
Add StepAttachDisk
2019-10-15 21:13:37 +00:00
Paul Meyer
4d750ddefa
Reuse amazon/chroot/step_pre_mount_commands.go
2019-10-15 21:13:37 +00:00
Paul Meyer
45d3f28c67
Add StepCreateNewDisk
2019-10-15 21:13:37 +00:00
Paul Meyer
3d329cf87d
Add chroot builder framework
2019-10-15 21:13:37 +00:00
Paul Meyer
369ec9a84c
Create disk attacher component
2019-10-15 21:13:37 +00:00
Paul Meyer
3c33aa4fc5
Add metadata client
2019-10-15 21:13:37 +00:00
Paul Meyer
113dc12346
Add function to detect whether Packer is running on Azure
2019-10-15 21:13:37 +00:00
Paul Meyer
f106adbd12
Add Azure client set for chroot builder
2019-10-15 21:13:37 +00:00
Paul Meyer
2ded8f25ec
Add metadata client
2019-10-15 21:13:37 +00:00
Paul Meyer
72fdce09ba
Allow GetServicePrincipalToken to be called independently
2019-10-15 21:13:37 +00:00
Jonathan Walker (Keenan)
6c486c4ab8
Fix "Acces" typo in amazon-ebs.html.md.erb
...
Found and fixed a typo in the Amazon EBS documentation for "Access"
2019-10-15 15:42:43 -04:00
Megan Marsh
3d5af49bf3
Merge pull request #8231 from yooakim/patch-1
...
Changed from jq to JMESPath queries
2019-10-15 10:25:55 -07:00
Adrien Delorme
9dac7908a5
Update mapstructure-to-hcl2.go
...
better comments
2019-10-15 15:25:01 +02:00
Adrien Delorme
71f80e2ad2
Update amazon-chroot.html.md.erb
...
unlink removed type
2019-10-15 15:17:05 +02:00
Vladimír
d6994df188
Select first adapter attached to host OS's switch
...
If more than one vNic is attached to vmSwitch, use the first one only.
2019-10-15 15:14:22 +02:00
Adrien Delorme
0e4fec03d7
make complete tests files link as windows can't handle synlinks
2019-10-15 12:56:43 +02:00
Adrien Delorme
21a0cbffba
fmt
2019-10-15 12:56:43 +02:00
Adrien Delorme
1158eeb46d
Update Makefile
...
to @go install ./cmd/mapstructure-to-hcl2 so that we can `make generate` and tests that generated code is what it should be
2019-10-15 12:56:43 +02:00
Adrien Delorme
a8b2918d0e
remote duplicate gob.Register(new(map[string]interface{}))
...
otherwise this panics
2019-10-15 12:56:42 +02:00
Adrien Delorme
8b1fcbb3bd
vendor vendors
2019-10-15 12:56:42 +02:00
Adrien Delorme
2b0e0d4eab
add hcl2template pkg
...
Package hcl2template defines code to parse hcl2 template files correctly.
In order to configure a packer builder,provisioner,communicator and post
processor.
Checkout the files in testdata/complete/ to see what a packer config could
look like.
2019-10-15 12:56:42 +02:00
Adrien Delorme
078ba7c8c3
commit old code generation tool
...
for history
2019-10-15 12:56:42 +02:00
Adrien Delorme
0eb9090dcf
Create mapstructure-to-hcl2.go
...
mapstructure-to-hcl2 fills the gaps between hcl2 and mapstructure for Packer
By generating a struct that the HCL2 ecosystem understands making use of
mapstructure tags.
Packer heavily uses the mapstructure decoding library to load/parse user
config files. Packer now needs to move to HCL2.
Here are a few differences/gaps betweens hcl2 and mapstructure:
* in HCL2 all basic struct fields (string/int/struct) that are not pointers
are required ( must be set ). In mapstructure everything is optional.
* mapstructure allows to 'squash' fields
(ex: Field CommonStructType `mapstructure:",squash"`) this allows to
decorate structs and reuse configuration code. HCL2 parsing libs don't have
anything similar.
mapstructure-to-hcl2 will parse Packer's config files and generate the HCL2
compliant code that will allow to not change any of the current builders in
order to move to HCL2 to softly move to HCL2.
2019-10-15 12:56:42 +02:00
Adrien Delorme
438f704333
fmt
2019-10-15 12:56:42 +02:00
Adrien Delorme
193d3e6bbd
provisioner.windows-shell: demove duplicate ExecuteCommand field
2019-10-15 12:56:42 +02:00
Adrien Delorme
771a6e55ef
pp.google.[import|export]: unexport Account field
...
so it doesnt temper with hcl2 cfg generation
2019-10-15 12:56:42 +02:00
Adrien Delorme
af08e2a410
pp.alicloud-import: remove duplicate AlicloudImageName field
...
( already defined in packerecs.Config )
2019-10-15 12:56:42 +02:00
Adrien Delorme
7be94f41a6
common.shell-local: unexport Ctx field
...
so that it doesn't temper with hcl2 generation
2019-10-15 12:56:42 +02:00
Adrien Delorme
766e5c77ef
builder.vmware.vmx: remove duplicate RemoteType field.
2019-10-15 12:56:42 +02:00
Adrien Delorme
00e3f97f5b
builder.vmware.iso: remove duplicate Format field
2019-10-15 12:56:42 +02:00
Adrien Delorme
6fbd664b66
builder.vagrant: simplify communicator.Config field
2019-10-15 12:56:42 +02:00
Adrien Delorme
3fe1c96491
builder.proxmox: make ProxmoxURL *url.URL field unexported
...
the only exported field we/users care about is ProxmoxURLRaw
2019-10-15 12:56:42 +02:00
Adrien Delorme
40692a4e38
builder.profitbricks: remove duplicate communicator.Config field
2019-10-15 12:56:41 +02:00
Adrien Delorme
3fa614b5e1
builder.oracle.oci: make ConfigProvider unexported
...
so that it doesn't temper with hcl2 code generation & parsing.
The field is set only later on after further processing.
2019-10-15 12:56:41 +02:00
Adrien Delorme
17c069baa5
builder.google:
...
* make CustomerEncryptionKey our own type so that it can be hcl2 generated
* make Account setting unexported so that it doesn't temper with HCL2 generation ( the field is set a bit later after processing )
2019-10-15 12:56:41 +02:00
Adrien Delorme
f8402f1b91
builder.azure.common: make CloudEnvironment private so it doesn't temper with hcl2 code generation
...
the struct is not read from file but later set after some computations
2019-10-15 12:56:41 +02:00
Adrien Delorme
221e72e9c3
builder.amazon.common: remove pointer (*) from []*string and map[*string]*string types
...
because they make hcl2/cty decoding panic
2019-10-15 12:56:41 +02:00
Adrien Delorme
8b8c2fc138
builder.amazon.chroot: remove specific BlockDevice definition
...
because the common one already has a KmsKeyId field
2019-10-15 12:56:41 +02:00
Adrien Delorme
6a85855c81
Merge pull request #8230 from alrs/fix-provisioner-err
...
provisioner/shell: fix dropped error
2019-10-15 12:37:51 +02:00
Lars Lehtonen
9c19cfdc6f
provisioner/shell: fix dropped error
2019-10-15 03:21:05 -07:00
Joakim Westin
8628c75de1
Changed from jq to JMESPath queries
...
Changed the examples to use AZ CLI built-in JMESPath query instead of needing `jq` tool installed (functionally they are the same)
2019-10-15 10:34:48 +02:00
Adrien Delorme
d2f5daf98f
Merge pull request #8209 from dvrkps/patch-3
...
Ignore retry.Config var
2019-10-15 10:29:51 +02:00
Megan Marsh
f05fd3969f
Merge pull request #8212 from hashicorp/fix_8204
...
Fix 8204
2019-10-14 14:40:17 -07:00
Megan Marsh
2e20facc8b
fix tests
2019-10-14 14:13:21 -07:00
Megan Marsh
f5a0810e7a
update changelog
2019-10-14 13:50:09 -07:00
Megan Marsh
7f6c8b93f8
Merge pull request #8227 from hashicorp/revert_backwards_incompatable_changes_for_1_4_5
...
Revert backwards incompatable changes for 1 4 5
2019-10-14 13:45:36 -07:00
Megan Marsh
0e70e0e5a4
fix template imports
2019-10-14 13:22:06 -07:00