Megan Marsh
fbb3d526e3
move region validation to run so that we don't break validation when we don't have aws creds set
2018-11-20 15:01:28 -08:00
Mikhail Ushanov
536252683e
builders: reuse private key file reading function
...
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-11-08 14:25:50 +03:00
Megan Marsh
79862f1bbb
Merge pull request #6931 from hashicorp/fix_6919
...
aws: better error handling of region/credential guessing from metadata
2018-11-05 11:24:09 -08:00
Adrien Delorme
3f288fc6ca
aws client: config.WithMaxRetries(8)
2018-11-01 15:09:07 +01:00
Mikhail Ushanov
4608b5d39d
amazon: add option for skipping TLS verification
...
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-10-29 21:35:29 +03:00
Adrien Delorme
f4fbf45349
remove duplicate region check error
2018-10-26 17:44:56 +02:00
Adrien Delorme
16aa21dffe
aws: better error handling of region guessing from metadata
...
* this will fix #6919
2018-10-26 12:24:10 +02:00
Adrien Delorme
ed793a8fb8
make ValidateRegion a member of *AccessConfig and make it variadic
2018-10-24 11:26:53 +02:00
Megan Marsh
fe044d8ff7
fix tests
2018-10-23 13:31:56 -07:00
Megan Marsh
340009009d
Revert "Revert "Merge pull request #6892 from hashicorp/fix_6890""
...
This reverts commit 0cd3f36d50
.
2018-10-23 09:58:27 -07:00
Megan Marsh
0cd3f36d50
Revert "Merge pull request #6892 from hashicorp/fix_6890"
...
This reverts commit 1c4062c316
, reversing
changes made to 9bc41a23b9
.
2018-10-23 09:34:05 -07:00
Megan Marsh
0924a316b7
fix template-set credentials
...
update tests with mocked session
2018-10-22 13:53:40 -07:00
Megan Marsh
9573013d3a
Merge pull request #6872 from aspectcapital/disable-ena-support
...
Add support to explicitly disable ENA support
2018-10-19 10:54:38 -07:00
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
Megan Marsh
57f87f58b9
Merge pull request #6374 from rickard-von-essen/aws-filters
...
builder/amazon: Add suppport for vpc_filter, subnet_filter, and security_group_filter
2018-10-18 14:34:02 -07:00
Megan Marsh
2266514408
Merge pull request #6843 from gmmephisto/pr-master-aws-security-group
...
aws: wait for temporary security group before authorize rules
2018-10-17 14:08:49 -07:00
Megan Marsh
e7d3a30c0e
Merge pull request #6865 from hashicorp/fix_6862
...
Fix 6862
2018-10-17 13:07:29 -07:00
Mikhail Ushanov
00c96fc400
aws: use IpPermissions for authorizing temporary security group
...
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-10-17 22:00:25 +03:00
Mikhail Ushanov
b316be51cd
aws: wait for temporary security group before authorizing
...
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-10-17 22:00:24 +03:00
Megan Marsh
b0cfecf314
remove unnecessary valid flag
2018-10-17 11:03:31 -07:00
Matt Dainty
9e0fae9db3
Add support to explicitly disable ENA support
...
If `ena_support` is set to false then it previously didn't do anything
whereas now it will explicitly disable ENA support.
Fixes #6852
2018-10-17 14:58:07 +01:00
Megan Marsh
d4767845f0
fix tests
2018-10-16 15:01:13 -07:00
Megan Marsh
7c3f0aa3b2
make sure region validation catches authentication errors
2018-10-16 14:17:30 -07:00
Mikhail Ushanov
ee133482b4
aws: add validation for device_name parameter
...
cause it's required in block-device-mapping.
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-10-16 21:37:48 +03:00
Megan Marsh
02bfac118f
default wait time for amazon import to one hour.
2018-10-09 13:08:42 -07:00
Megan Marsh
f494d87dc5
Merge pull request #6747 from hashicorp/fix_6743
...
abort if image import fails
2018-10-09 12:56:28 -07:00
Adrien Delorme
f44dfcc62f
Merge pull request #6727 from hashicorp/fix_6723
...
reset poll delay seconds default to 2 because it can actuall be used …
2018-10-03 11:15:42 +02:00
Adrien Delorme
22d3e9b5c4
builder/amazon/ebs: pass config as a pointer so values could be populated by a run
2018-09-27 16:27:34 +02:00
Matthew Hooker
9181570bc3
remove stray struct dumps in logs
2018-09-27 00:14:05 -07:00
Megan Marsh
d616f0ba71
abort if image import fails
2018-09-20 13:18:59 -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
Anshul Sharma
ef3c10c403
Modify Validate Region for test cases
2018-09-17 14:45:55 -07:00
Anshul Sharma
98f13eaf29
Use DescribeRegions for aws region validation
2018-09-17 14:45:55 -07:00
Megan Marsh
f4e6d06e68
reset poll delay seconds default to 2 because it can actuall be used in one part of the conditional tree for applyEnvOverrides
2018-09-17 11:10:50 -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
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