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
770f61e682
spot instance creation, only set blockDurationMinutes when > 0
2018-09-12 10:21:39 -07:00
Adrien Delorme
2e73ed8d46
pass Comm instance to fix Spot instance creation
2018-09-11 18:20:14 -07:00
Matt DeBoer
09797df958
use a UI wrapper to auto-decode error messages
...
update docs to reflect optional config
2018-09-11 16:05:43 -07:00
Megan Marsh
a0edaf6c46
Going to revert this change for now, becuase of potential issues that arise from calling Prepare() twice
...
Revert "use statebag instead of SetSharedState for winRM password"
This reverts commit b35acbd879
.
2018-09-10 16:48:42 -07:00
Adrien Delorme
e02d0dacc4
Merge branch 'master' into aws-filters
2018-09-07 16:14:00 +02: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
Adrien Delorme
b80e1d51c6
aws: when building an AMI with 'encrypt_boot: true', randomize the name of the temporary AMI
2018-09-05 10:24:28 +02: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
349f9ae62b
Merge pull request #6641 from hashicorp/increase_retries
...
Increase retries
2018-09-04 11:39:28 -07:00
Adrien Delorme
2a2734505b
Merge pull request #6649 from hashicorp/fix_6569
...
Fix 6569
2018-09-03 08:44:07 +02: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
Megan Marsh
4472ecccb0
fix waiters that weren't applying env defaults
2018-08-31 13:30:41 -07:00
Megan Marsh
9926988ab7
Merge pull request #6621 from hashicorp/ssh_keys_centralised
...
Merge ssh fields usage
2018-08-30 14:13:21 -07:00
Megan Marsh
2b9f937c23
increase max retries from 3 to 20
2018-08-30 09:35:06 -07: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
0938b640cc
use key pair name from config
2018-08-29 14:40:33 +02:00
Adrien Delorme
ef4ca9c48e
builder.amazon: use c.Comm for ssh
2018-08-29 14:40:33 +02:00
Adrien Delorme
9a9b82715b
config.Comm.SSHKeyPair => SSHKeyPairName
2018-08-29 14:40:33 +02:00
Adrien Delorme
3a4bb26150
builder.aws: use key pair from comm struct
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
Megan Marsh
e4f6b6f720
fix chroot communicator to properly escape quotes
2018-08-28 09:16:43 -07:00
Matthew Hooker
e41e99954d
go 1.11 format rules
2018-08-24 15:56:44 -07:00
Megan Marsh
b35acbd879
use statebag instead of SetSharedState for winRM password
2018-08-24 13:51:16 -07:00
Rickard von Essen
23f62f221e
Only filter SG's on VPC if it's set. Only use VPC's and Subnets that are available
2018-08-24 20:24:48 +02:00
Megan Marsh
fa99f931b7
Merge pull request #6601 from hashicorp/fix_6536
...
Increase waiter timeout for AWS WaitUntilImageAvailable command
2018-08-24 09:35:58 -07:00
Adrien Delorme
6bbcd3e914
Remove remaining unused ssh config funcs and add missing calls ( #6622 )
...
* Remove duplicate unused SSHConfig funcs
* call to SSHConfigFunc() for azure/arm builder
* ncloud too
* remove empty ncloud file
2018-08-24 16:00:40 +02:00
Rickard von Essen
533967cb66
builder/amazon: Add suppport for security_group_filter
...
Allow selecting SG's using a filter. Also some cleanup of vpc_filter and
subnet_filter.
2018-08-24 12:42:38 +02: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
Rickard von Essen
9840862757
builder/amazon: Add suppport for vpc_filter and subnet_filter
...
First step of adding support for discovering VPC's and Subnets using
filters.
2018-08-23 12:52:03 +02: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
Matthew Hooker
31fcfe4bc2
PoC for filtering logs
2018-08-20 15:20:21 -07:00
Megan Marsh
00c6ec979f
do 30 minutes not 25
2018-08-17 13:30:02 -07:00
Megan Marsh
00de0f4996
increase the timeout for waiting for an ami to become available
2018-08-17 13:27:19 -07:00
Megan Marsh
71cad4f2a9
fix tests
2018-08-14 12:30:05 -07:00
Megan Marsh
250da0ab49
fix security hole with ami filter
2018-08-13 17:01:13 -07:00
Anshul Sharma
c1edcd3774
amazon-ebssurrogate clean up volumes
2018-07-26 09:38:59 +03:00
Megan Marsh
07b6bc0c4f
Merge pull request #6504 from sharmaansh/6309-amazon-chroot-create-volume-tags
...
amazon-chroot: Add tags on CreateVolume
2018-07-23 14:58:17 -07:00
Matthew Hooker
814c1cf2b2
spellfix
2018-07-18 13:00:45 -07:00
Anshul Sharma
885ecb0790
Issue-6309 Amazon Chroot Provider
...
- Add tags on CreateVolume
2018-07-18 13:01:15 +03: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
Mark Meyer
2fec76ea87
Check if spot price is empty, when spot_tags is set
2018-07-13 22:42:42 +02:00
Megan Marsh
b6b907f523
read in the environment variables that government wait time and polling time for the AWS wait in step_stop_ebs_volume
2018-07-13 09:43:28 -07:00
Megan Marsh
8e22803099
fix loading of environment variables for managing aws waiters
2018-07-11 13:10:38 -07:00
Megan Marsh
f657ca39c9
refactored env var code and tests so that I don't have to set env vars during tests to check logic
2018-07-11 10:36:21 -07:00
Megan Marsh
14166fdd99
update amazon import docs to include the env vars for setting aws waiter delays and timeouts
2018-07-11 10:36:21 -07:00
Megan Marsh
bfbe318727
fix the homegrown waiters
...
fix image import; issue was with wait options not being evaluated
2018-07-11 10:36:21 -07: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
EC2 Default User
58f73aabbf
Add ap-northeast-3 region
2018-06-15 07:15:41 +00:00
Megan Marsh
87a93e84ac
sh -c to execute command to accomodate communicator change
2018-06-08 13:14:55 -07:00
James Nugent
b97475b647
Merge pull request #6265 from DanHam/enable-t2-unlimited
...
Add support for T2 Unlimited for Amazon builders
2018-05-25 00:26:17 +04:00
DanHam
af7f7f2ce9
Fix redundant Sprintf
2018-05-24 21:05:03 +01: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
M. Marsh
a8b6a04dda
Merge pull request #6194 from hashicorp/fix_6176
...
allow user to mount entire block device in chroot builder
2018-05-21 15:28:18 -07:00
DanHam
ec8b70721c
Use an explicit error message when an error is expected and we don't get one
...
Previously, if the validation check generating the error in the main code
is removed, the 'should error' tests would just return an empty message
2018-05-15 12:25:06 +01:00
DanHam
82c8710af5
Use fmt.Errorf over errors.New as we only require basic error reporting
2018-05-15 12:25:06 +01:00
DanHam
99e3487795
Add missing validation and tests for Spot Instance requests
2018-05-15 12:25:06 +01:00
DanHam
d5304a25e9
Pass T2 Unlimited settings to run instance step for appropriate EC2 builders
2018-05-15 12:25:06 +01:00
DanHam
6fc68754d7
Allow use of T2 unlimited by adding appropriate request for the instance
2018-05-15 12:25:06 +01:00
DanHam
df7fb86984
Add tests for T2 Unlimited configuration
2018-05-15 12:25:06 +01:00
DanHam
be02b3f613
Validate template settings when T2 Unlimited has been enabled
...
* T2 Unlimited cannot be used with anything other than T2 instance types
* T2 Unlimited cannot be used with Spot Instances
2018-05-15 12:25:06 +01:00
DanHam
482629ae90
Add config option to enable/disable T2 Unlimited for the launched instance
2018-05-15 12:25:06 +01:00
DanHam
2c339b99d2
Sort run config options alphabetically
2018-05-15 12:25:06 +01: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
Matthew Hooker
0521efa200
correctly log reason waiting for ami failed.
2018-05-03 12:27:09 -07:00
Matthew Hooker
7d5ebd5500
Merge pull request #6217 from alessiot77/5887
...
Feature Request: Log reason why AMI creation failed
2018-05-03 10:57:46 -07:00
AlessioT
3d4c7d0df1
Feature Request: Log reason why AMI creation failed
2018-04-30 20:59:13 +01:00
DanHam
9b6fc5a58d
Remove tmp files created by builder/amazon/instance tests
2018-04-30 18:16:46 +01:00
DanHam
54e9690dff
Remove tmp files created by builder/amazon/common tests
2018-04-30 18:16:46 +01:00
AlessioT
373226e9c5
Extract state reason for failure
2018-04-28 12:40:48 +01:00
AlessioT
09bb21774d
alessio.tomasino@yahoo.co.uk
2018-04-28 11:02:53 +01:00
AlessioT
c27f3e9445
alessio.tomasino@yahoo.co.uk
2018-04-28 11:00:33 +01:00
Megan Marsh
59e3ec722d
allow user to mount entire block device in chroot builder
2018-04-25 10:47:52 -07:00
Matthew Hooker
cbdf9db832
Use contexts with amazon waiters.
2018-04-23 12:57:15 -07: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
f094b3be85
update changelog
2018-04-05 16:32:03 -07:00
Matthew Hooker
302b1988a5
Restrict deregistered AMIs to those owned by self.
2018-04-05 13:29:36 -07:00
Megan Marsh
22608f3efd
Merge pull request #6088 from adongy/master
...
Expose more source ami data in the template
2018-04-02 16:32:16 -07:00
ADO
04790695e6
Add interpolate_build_info_test tests
2018-03-30 16:46:35 +02:00
ADO
507b3619e7
Expose more source ami data in the template
2018-03-30 10:47:11 +02:00
Joseph Wright
1913517d29
Fix formatting by running `make fmt`
2018-03-25 19:51:49 -04:00
Joseph Wright
cb3699a584
Modify ebssurrogate builder to snapshot all launch devices
...
Documentation for ebssurrogate states that all of the devices in
`launch_block_device_mappings` are snapshotted and included in the
image. In fact, only the device that was designated as the root
device was snapshotted. This patch modifies the builder to create
snapshots of all the devices and include them in the image. This
allows creating images with separate filesystems preconfigured,
rather than having to add volumes to `ami_block_device_mappings`
and configure them after boot.
2018-03-25 19:37:44 -04:00
Megan Marsh
072cd6b745
Merge pull request #5998 from hashicorp/do_5895
...
allow users of AWS to use the dynamically-generated admin password wh…
2018-03-22 16:01:22 -07:00
Matthew Hooker
b16f2ec64b
builder/amazon: Use sdk default cred providers
...
I think we were overcomplicating things. The SDK provides the correct
credential chain by default, so let's use that. This patch does a quick
check for static credentials and uses those if found, then defaults to
the default credential provider chain.
This patch also removes the metadata timeout argument. Current versions
of the SDK have short timeouts by default, so I don't believe this is
needed.
2018-03-15 16:49:47 -07:00
Matthew Hooker
e483087574
builder/amazon: Use service default retries.
...
Each service has its own preconfigured number of times to retry.
Lets use that instead of setting a global number.
2018-03-14 22:26:35 -07:00
Megan Marsh
d689e6b4d3
allow users of AWS to use the dynamically-generated admin password which we use as the winRM password as an elevated password in the Powershell provisioner, as well as an environment variable in same provisoner.
2018-03-14 15:58:12 -07:00
Josh Soref
0171dfc890
spelling: validating
2018-03-14 03:28:19 +00:00
Josh Soref
007930ec2d
spelling: restricted
2018-03-14 03:20:51 +00:00
Less Mo
686cacb435
builder/amazon: Added new region cn-northwest-1
...
Add new region China Ningxia cn-northwest-1.
2018-03-02 16:34:19 +08:00
Matthew Hooker
2806523834
Fix issue with assume role credentials
2018-02-15 14:54:01 -08:00