1258 Commits

Author SHA1 Message Date
Lars Lehtonen
7a09f9c678
builder/amazon/common: remove dead test function fakeModifyEBSBackedInstanceState() 2019-10-31 12:22:10 -07:00
Lars Lehtonen
0a13b620d6
builder/amazon/common: remove dead test function StepModifyEBSBackedInstance_EnableAMIENASupport() 2019-10-31 12:19:28 -07:00
Lars Lehtonen
c74df8b652
builder/amazon/common: remove dead test function getMockConnSpot() 2019-10-31 12:15:53 -07:00
Lars Lehtonen
e5e2bfa83f
builder/amazon/common: remove nil check on slice, len() on nil slices is zero 2019-10-31 12:09:32 -07:00
Adrien Delorme
819329228a Change back to make sure all durations are a time.Duration
It is simply the best/simplest solution and trying to prevent users from passing and integer here would be like opening a can of worms. Because:

* we cannot make mapstructure validate our duration string ( with an UnmarshalJSON func etc.)
* we cannot make mapstructure spit a string instead of a duration and packer will decode-encode-decode config.
* the hcl2 generated code asks for a string, so this will be enforced by default.
2019-10-31 16:12:07 +01:00
Adrien Delorme
bf3d9841c6 Force durations to be passed a strings
Before this commit it was possible to set a duration using an integer or a float. Go's time.Duration is an int64 internally an mapstructure will take advantage of this and load the number as a int64 but `1` means one ns which is unexpected/confusing. To avoid confusion and enforce readability this forces users to pass a string with a unit for a duration; ex "56s".
2019-10-31 11:47:19 +01:00
Megan Marsh
6191b9c8c6
Merge pull request #8288 from hashicorp/fix_8271
add some extra layers of validation to make sure that people don't tr…
2019-10-30 10:41:52 -07:00
Megan Marsh
d084cd1895 Update builder/amazon/common/ami_config.go 2019-10-30 09:41:23 -07:00
Megan Marsh
e9f02e44cb add test to catch this case 2019-10-29 11:28:56 -07:00
Megan Marsh
7cf47fc463 add some extra layers of validation to make sure that people don't trip over magical encrypt_boot settings later in the build 2019-10-29 11:26:22 -07:00
Megan Marsh
e2283445f2 need to initialize variables scoped to the individual loop, because the address of k,v stay the same and that means we overwrite previous variables when assigning them to the struct directly. 2019-10-28 14:31:13 -07:00
Megan Marsh
a783a09ea3
Merge pull request #8269 from paulmey/paulmey/generalize-chroot
[amazon/chroot] Move common/generic chroot builder steps to common directory
2019-10-24 14:32:01 -07:00
Megan Marsh
7928b5b045 fix transcription error from when we moved to generated docs 2019-10-24 10:19:03 -07:00
Paul Meyer
3be7d81ce2 Move common steps together 2019-10-24 04:21:46 +00:00
Paul Meyer
e6dfe301ac Move CommandWrapper & ShellCommand to common 2019-10-24 04:06:29 +00:00
Megan Marsh
b9245a402d add structure to its own struct to make generated code stop complaining 2019-10-23 10:46:42 -07:00
Megan Marsh
5614f307fb regerate code
generate flat FlatPolicyDocument
add PolicyDocument to generate command
2019-10-23 10:46:07 -07:00
Megan Marsh
d15f43e4eb
Merge pull request #8232 from hashicorp/artifact-tree
HCL2 configs - part one
2019-10-22 11:54:34 -07:00
Bernard Baltrusaitis
ec1d70dc44 adding required changes 2019-10-22 21:40:18 +11:00
Bernard Baltrusaitis
65d1447b64 adding formatting 2019-10-19 21:33:58 +11:00
Bernard Baltrusaitis
6e2146324f Merge branch 'master' of github.com:b-b3rn4rd/packer 2019-10-19 20:56:49 +11:00
Bernard Baltrusaitis
8b83cca064 adding temporary instance profile document policy 2019-10-19 20:56:18 +11:00
Adrien Delorme
cf1555bf17 Merge remote-tracking branch 'origin/master' into artifact-tree 2019-10-16 10:22:56 +02:00
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
4d750ddefa Reuse amazon/chroot/step_pre_mount_commands.go 2019-10-15 21:13:37 +00:00
Adrien Delorme
078ba7c8c3 commit old code generation tool
for history
2019-10-15 12:56:42 +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
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
0e70e0e5a4 fix template imports 2019-10-14 13:22:06 -07:00
Megan Marsh
44f91c9afc Revert "remove clean_ami_name and clean_image_name; complete the deprecation for these functions in favor of clean_resource_name"
This reverts commit 0026792d2f60f03abc04239640065e967581310c.
2019-10-14 13:08:15 -07:00
Megan Marsh
4bc381183d make aws instsance builder work with recent changes for volume copy 2019-10-09 16:59:51 -07:00
Megan Marsh
e283023d9b make sure step_register_ami in chroot builder respects encryption and ami skip build retion values once the copy happens 2019-10-09 16:52:41 -07:00
Megan Marsh
469af8e592 ebssurrogate builds didn't keep up with recent optimizations to region encryption in the ebs builder, and that was causing bugs with the common ami region copy step 2019-10-09 16:02:37 -07:00
Adrien Delorme
d4600a7716 fix go imports 2019-10-04 11:19:45 +02:00
Megan Marsh
0026792d2f remove clean_ami_name and clean_image_name; complete the deprecation for these functions in favor of clean_resource_name 2019-10-03 15:49:01 -07:00
Megan Marsh
e16fb19bfc don't abort on a single error if another availability zone was able to create the instance 2019-10-02 14:17:00 -07:00
Megan Marsh
eccf0fb51d update docs 2019-09-27 09:51:18 -07:00
Megan Marsh
e047b97bf7
Merge pull request #8162 from hashicorp/fix_8154
make sure amazon builders respect ssh_host option
2019-09-27 09:34:49 -07:00
Megan Marsh
ac6e7a4800 updates tests to validate that ssh_host value supplied in the template overrides all else 2019-09-27 09:19:23 -07:00
Adrien Delorme
941dc394f0 Update step_run_spot_instance.go 2019-09-27 13:04:52 +02:00
Adrien Delorme
d049284120
Update builder/amazon/common/step_run_spot_instance.go
remove unused code that might induce errors
2019-09-27 13:00:53 +02:00
Adrien Delorme
07e97e26de
step_run_source_instance.go: make sure we use the right ShouldRetry error 2019-09-27 12:57:55 +02:00
Megan Marsh
c722009159 we only need one describeInstances call, not 3, and it should be wrapped in a retry 2019-09-26 15:47:01 -07:00
Megan Marsh
e47059aaca put retry around describeinstances call in amazon 2019-09-26 14:49:28 -07:00
Megan Marsh
31bb1e818f fix tests 2019-09-26 13:02:11 -07:00
Megan Marsh
0cbd3ff0f3 make sure amazon builders respect ssh_host option 2019-09-26 12:30:04 -07:00