Commit Graph

206 Commits

Author SHA1 Message Date
Matt Dainty feb8067c7d Convert `ena_support` to a pointer
This means it now has three states, `true`, `false`, & `nil`. The
default state is now `nil` which does nothing instead of `false` which
now will explicitly disable ENA support instead of just not enabling it.
2018-10-19 12:40:43 +01:00
Matthew Hooker 9181570bc3
remove stray struct dumps in logs 2018-09-27 00:14:05 -07:00
Megan Marsh 79093da6ad skip region validation in tests that don't care; refactor Prepare func so we can test region validation logic with a mock 2018-09-19 10:30:08 -07:00
Megan Marsh 93f1155a14 remove test-related special casing 2018-09-18 08:08:36 -07:00
Sargun Dhillon 63d784023f Add support to support non-gp2 volume types for building from_scratch 2018-09-06 13:22:09 -07:00
Sargun Dhillon 07ce820c70 Enable setting the volume type when building with the Amazon Chroot builder 2018-09-06 13:22:09 -07:00
Megan Marsh b94e6e913e
Merge pull request #6670 from sargun/fix-ena-on-pv
Allow users to build hvm images from pv images to have ena_support
2018-09-06 12:50:46 -07:00
Sargun Dhillon 902497d6ce Allow users to build hvm images from pv images to have ena_support 2018-09-04 18:16:52 -07:00
Megan Marsh e4f6b6f720 fix chroot communicator to properly escape quotes 2018-08-28 09:16:43 -07:00
Megan Marsh ff6a039d5b replace scrubconfig with packer.LogSecretFilter.Set
filter winrm password from logs
Add new root-level packer template option, sensitive-variables, to tell us what user variables to mark sensitive.
2018-08-20 15:35:55 -07:00
Anshul Sharma 885ecb0790
Issue-6309 Amazon Chroot Provider
-  Add tags on CreateVolume
2018-07-18 13:01:15 +03:00
Megan Marsh f49a2d8aed move UI call to before the wait; add context to these steps 2018-07-11 10:36:21 -07:00
Megan Marsh cf63dd10bf replace AMIStateRefreshFunc, InstanceStateRefreshFunc, our spot instance waiter, our chroot volume waiter, and our snapshot waiters with waiters form AWS's SDK. 2018-07-11 10:34:20 -07:00
Megan Marsh 87a93e84ac sh -c to execute command to accomodate communicator change 2018-06-08 13:14:55 -07:00
M. Marsh 62e1323577
Merge pull request #5956 from hashicorp/dedupe_shell_local
Deduplicate the code for the shell-local post-processor and shell-local provisioner
2018-05-23 15:54:27 -07:00
Megan Marsh e670eed315 Add new option, nvme_device_path, so that we can properly mount nvme block devices. 2018-05-23 09:16:40 -07:00
Megan Marsh 6dc4b1cbdc move all of the run commands for shell-local provisioner and postprocessor into common library too 2018-05-07 15:10:09 -07:00
Megan Marsh 616b41e58f deduplicate the nearly identical communicators for the shell-local provisioner and post-processor, moving single communicator into a new common/shell-local module 2018-05-07 15:10:09 -07:00
Megan Marsh 59e3ec722d allow user to mount entire block device in chroot builder 2018-04-25 10:47:52 -07:00
Matthew Hooker 21812fa17f
Add volume and run tags if in us-gov/china
We can't tag on instance creation when we're in "restricted" regions,
so let's add the tags after the resources have been created.

Adds methods to AccessConfig to detect if we're in China or US Gov
regions (i.e. "restricted").

Also turns tag:tag maps into a type, and moves methods around validating
and converting them to ec2Tags to methods of the type.
2018-02-05 16:39:20 -08:00
Matthew Hooker fad4d5c272
update tests for mapstructure behavior changes 2018-01-26 12:40:34 -08:00
Matthew Hooker 7a189a83a1
fix imports
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker a831d522be
change run signatures
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.

`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker ebe995c0ff
run goimports 2018-01-22 17:21:10 -08:00
Matthew Hooker f3dea272d9
Set session in state bag
We can construct connections to arbitrary regions from it
2017-12-19 11:32:33 -08:00
Matthew Hooker f6c401a143
don't pass in accessconfig 2017-12-19 11:32:32 -08:00
Rong Chen 3e92b1374e issue5606: follow the convention to use AccessConfig to create new aws session for step_create_tags etc. 2017-12-19 10:34:12 -08:00
Krzysztof Wilczynski 05327b7524
amazon: Remove Session Token (STS) from being shown in the log.
This commit adds a change which ensures that the Session Token
config struct item is removed from log output.

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
2017-12-04 22:14:38 +01:00
Matthew Hooker f681faa296
fix tests 2017-11-07 14:57:10 -08:00
Matthew Hooker c65fa8490d
fix various bugs deregistering AMIs
always deregister ami in session region
validate that session region does not appear in ami_regions
2017-10-30 14:17:19 -07:00
Megan Marsh 85ad1f58fb include ena_support and sriov_support in chroot and instance docs 2017-08-29 09:36:06 -07:00
Megan Marsh 2d4bc70d7b use ami prefix to make it clear that these variables are amazon specific
add fixer, fixer tests
2017-08-28 11:21:27 -07:00
Megan Marsh 9e2e467b31 Allow granular modification of sriov and ena enhanced networking options in amazon amis. Maintain old functionality. 2017-08-25 14:49:53 -07:00
Megan Marsh 7da52e1f77 Merge pull request #5250 from hashicorp/repro_3399
make force_deregister work in all regions, not just original region.
2017-08-24 14:41:02 -07:00
Megan Marsh 14b2d04332 make force_deregister work in all regions, not just original region. 2017-08-14 12:31:58 -07:00
Sean Chittenden cd84b17923
Fix building packer on GOOS=solaris
Update to golang/x/sys/unix is coming in the subsequent commit.
2017-08-14 10:34:06 -07:00
Megan Marsh e9ec705497 use block device mappings to know whether a snapshot existed before packer's current run. If yes, don't delete the unencrypted snapshot. 2017-08-08 13:59:55 -07:00
Matthew Hooker 58e386827a
fix typo 2017-06-09 10:40:50 -07:00
Matthew Hooker 56c513088b
I think this was the intention 2017-06-09 10:34:49 -07:00
Rickard von Essen 3833d34829
builder/amazon: Cleaned up credential handeling
This properly handles:
- Preference between types of credential
- Assume role via ECS Task Role
2017-06-09 10:26:22 -07:00
Megan Marsh b8c2a5fd43 fix step initializer everywhere StepAMIRegionCopy is called 2017-06-01 09:28:17 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker cc11ec3566
check for a couple errors 2017-03-28 20:36:21 -07:00
Matthew Hooker d1b20b3d9c
remove a bunch of dead code.
https://github.com/dominikh/go-tools/tree/master/cmd/unused
2017-03-28 20:36:20 -07:00
Matthew Hooker 230079f73a
spell fixes 2017-03-28 20:36:19 -07:00
Matthew Hooker e4aa2a34ca
builder/amazon-chroot: nullable copy_files
Allow users to specify that they don't want any
files copied into the chroot by setting an empty
copy_files list
2017-03-24 13:51:47 -07:00
Matthew Hooker 50d9546658
builder/amazon: set force_deregister to true on -force 2017-03-09 14:24:49 -08:00
Matthew Hooker 61976dfd86 Merge pull request #4578 from life360/enable_ena
Always set both SRIOV and ENA when Enhanced Networking is enabled
2017-02-26 19:31:22 -08:00
Matthew Hooker 6a7c37beb6
builder/amazon-chroot: support encrypted boot volume 2017-02-26 17:48:13 -08:00