1169 Commits

Author SHA1 Message Date
Megan Marsh
a35ac0127e fix bug in step_region_copy 2019-11-18 10:11:59 +01:00
nywilken
488e539f63 builder/amazon: Add helper function for checking against AWSError
Replace all straight forward occurrences of `if err, ok := err.(awserr.Error)` with the `isAWSErr` helper function
2019-11-12 15:27:47 -05:00
Megan Marsh
6e2456d028 make error messaging around ResourceNotReady better, update docs with other possible issues (#8349) 2019-11-08 11:15:24 +01:00
cove
2898d66812
retry runinstances aws api that wasn't retried and could fail 2019-11-06 14:06:35 -08:00
Megan Marsh
6c704f7046 Revert "fix template imports"
This reverts commit 0e70e0e5a4c570790f7f253e69c6e09ed18e38d1.
2019-11-04 14:29:00 -08:00
Megan Marsh
517834d528 Revert "Revert "remove clean_ami_name and clean_image_name; complete the deprecation for these functions in favor of clean_resource_name""
This reverts commit 44f91c9afc1884132f4d4cc69ceb1e04f4e4664c.
2019-11-04 14:28:40 -08:00
Megan Marsh
fcb65ee422
Merge pull request #8307 from hashicorp/fix_8116
delete amazon import post-processor intermediary snapshots
2019-11-01 14:55:22 -07:00
Megan Marsh
e9e4c102e5 delete amazon import post-processor intermediary snapshots 2019-11-01 14:17:44 -07:00
Adrien Delorme
1b7ef252d2
Merge pull request #8303 from alrs/amazon-builder-cleanup
Cleanup builder/amazon/common
2019-11-01 11:06:06 +01:00
Lars Lehtonen
d072079899
builder/amazon/common: remove dead test type and function mockEC2Conn_Modify_EBS.ModifyInstanceAttribute() 2019-10-31 12:38:32 -07:00
Lars Lehtonen
953be1603b
builder/amazon/common: remove dead test type and function mockEC2ConnSpot.DescribeSpotPriceHistory() 2019-10-31 12:34:11 -07:00
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