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
38cc525ec7
new option allowing user to clean up the ephemeral ssh key from the authorized_keys file
2018-09-14 11:06:38 -07:00
Adrien Delorme
2e73ed8d46
pass Comm instance to fix Spot instance creation
2018-09-11 18:20:14 -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
RenaudS
26aab49aaf
aws spot instances: add block_duration_minutes option ( #6638 )
...
* Add block_duration_minutes option
* int64 cannot be nil
* Update doc
* Fix formating
2018-09-03 08:33:58 +02:00
Adrien Delorme
df9e756865
pass the Comm instance to the amazon ebs builders steps
2018-08-30 12:50:29 +02:00
Adrien Delorme
b0c09087a2
move SSHInterface/SSHIPVersion fields to communitator.Config struct
2018-08-29 14:51:28 +02:00
Adrien Delorme
ef4ca9c48e
builder.amazon: use c.Comm for ssh
2018-08-29 14:40:33 +02:00
Adrien Delorme
293c485372
builder.aws: use SSHAgentAuth from Comm
2018-08-29 14:40:33 +02:00
Adrien Delorme
ef08c441c9
builder.aws: use Comm field for StepKeyPair & StepGetPassword
2018-08-29 14:40:33 +02:00
Adrien Delorme
51d2aac9f6
SSHPrivateKey => SSHPrivateKeyFile
2018-08-29 14:40:32 +02:00
Matthew Hooker
e41e99954d
go 1.11 format rules
2018-08-24 15:56:44 -07:00
Megan Marsh
340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
...
Merge ssh config funcs from builders
2018-08-23 16:03:36 -07:00
Adrien Delorme
41f6e0334d
refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
...
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02: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
James Nugent
9fffe4056e
Merge pull request #5452 from smaato/tag-spot-requests
...
Enable tagging of spot requests
2018-07-16 13:00:07 -05: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
Mark Meyer
3dbf1cb371
Enable tagging of spot requests
...
This adds a new parameter to the EBS builders named `spot_tags'. This
parameter accepts a map of tags, much like `tags'. These tags will be
applied to a spot request that is created.
Improve visibility.
2018-07-07 16:06:51 +02:00
DanHam
d5304a25e9
Pass T2 Unlimited settings to run instance step for appropriate EC2 builders
2018-05-15 12:25:06 +01:00
DanHam
9b6fc5a58d
Remove tmp files created by builder/amazon/instance tests
2018-04-30 18:16:46 +01:00
Megan Marsh
3afb243f11
use build name to ensure that winrm password and other shared state is not overwritten if two builders need the password in the same packer run.
2018-04-16 13:41:17 -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
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
Rickard von Essen
63f791570a
Merge pull request #5665 from kwilczynski/remove-sts-token-from-logging
...
amazon: Remove Session Token (STS) from being shown in the log.
2017-12-10 06:50:42 +01:00
Matthew Hooker
f216330ba3
spot instance ena/sriov checking for all other builders
2017-12-08 14:56:19 -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
John Davies-Colley
707ec675b2
ssh interface for amazon builders 🔨
2017-11-22 15:49:38 +13:00
Matthew Hooker
8ab390a048
Merge pull request #5495 from smaato/master
...
Fix regressions relating to spot instances and EBS volumes
2017-11-02 08:53:27 -07: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
Mark Meyer
4c5df79222
Fix regressions introduced in the instance builder
...
Related to #5504
2017-10-24 23:23:18 +02:00
Matthew Hooker
f7e269945e
add cidr validation and rename option
2017-10-12 17:05:56 -07:00
Matthew Hooker
c74be87187
Merge pull request #5384 from dave2/sg-source-cidr
...
[WIP] Allow temporary security group to have source CIDR block explicit
2017-10-12 17:05:45 -07:00
SwampDragons
512ac214b4
Merge pull request #5417 from smaato/master
...
Add ability to tag volumes on creation
2017-10-12 12:56:25 -07:00
Mark Meyer
dbb3c76032
Remove redundant step and its usage
...
StepTagEBSVolumes is no longer needed, since this functionality is now
taken over by StepRunSourceInstance and StepRunSpotInstance. So remove
this functionality from the codebase.
2017-10-12 21:40:21 +02:00
Matthew Hooker
ae455bff99
add debugging help if ec2-upload-bundle fails
2017-10-05 17:33:07 -07:00
Mark Meyer
2661fd7869
Move building of spot instances into its own step
2017-10-04 12:38:21 +02:00
Zanetti, David
8a8b51be97
Allow temporary security group to have source CIDR block explicitly provided
2017-09-26 00:57:56 +00:00
Matthew Hooker
02cd6bc7f0
Merge pull request #5288 from hashicorp/fix3114
...
add token variable to upload bundle command template
2017-09-25 18:36:28 -05:00
Matthew Hooker
4bc8e7de3d
add token variable to upload bundle command template
2017-09-25 16:35:53 -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
14b2d04332
make force_deregister work in all regions, not just original region.
2017-08-14 12:31:58 -07:00