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
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
Adrien Delorme
770f61e682
spot instance creation, only set blockDurationMinutes when > 0
2018-09-12 10:21:39 -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
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
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
2b9f937c23
increase max retries from 3 to 20
2018-08-30 09:35:06 -07: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
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
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
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
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
Matthew Hooker
814c1cf2b2
spellfix
2018-07-18 13:00:45 -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
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
DanHam
af7f7f2ce9
Fix redundant Sprintf
2018-05-24 21:05:03 +01: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
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
DanHam
54e9690dff
Remove tmp files created by builder/amazon/common tests
2018-04-30 18:16:46 +01: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
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
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
Matthew Hooker
19a89a101e
builder/amazon: remove ssh_private_ip
...
ssh_private_ip should now be set through ssh_interface.
Adds fixer to automatically fix existing json files
2018-02-08 16:47:43 -08:00
Matthew Hooker
5b64f71702
Merge pull request #5764 from hashicorp/fix5760
...
"borrow" access config code from terraform.
2018-02-08 14:55:43 -08: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
eafda52411
use amazon steps from master
2018-01-24 17:09:18 -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
a0c625ea44
Revert "working with opt-in"
...
This reverts commit 4068ffdaf541354e75507add7ca0b193993fcd52.
2018-01-24 17:09:16 -08:00
Matthew Hooker
e98f201602
working with opt-in
2018-01-24 17:09:16 -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
807e88245b
trying to add context to state bag
2018-01-24 17:09:15 -08:00
Matthew Hooker
cea2ab8c6d
move kms/encrypted validation to block devices
2018-01-12 15:10:51 -08:00
Jason Wieringa
2ac59b3c27
builder/amazon: Added KmsKeyID to BlockDevice
...
+ Adds kms_key_id to list of options
+ Tests that configuraiton is set along with encrypted
+ Updates documentation on ebsvolume builder
2018-01-11 20:27:38 -08:00
Matthew Hooker
f5ea1e8312
Use WaitUntilInstanceReady waiter
2018-01-10 15:57:31 -08:00
Matthew Hooker
c5bcb97d06
"borrow" access config code from terraform.
...
This gives us a few benefits:
* timeout early if metadata service can't be reached
* report which auth provider we're using
* give much better errors if something goes wrong
2018-01-04 15:04:07 -08:00
Matthew Hooker
98c2a2d1f7
builder/aws: catch static credential errors early.
...
If we're using static credentials, either both the access key and secret key must be set, or neither of them should be.
2018-01-04 11:50:27 -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
1c352726d7
Merge pull request #5719 from rchenv/issue5606
...
Ensure all AWS connections are configured alike
2017-12-19 11:32:24 -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
Olivier Bazoud
8bcb469b8b
builder/amazon: Added new region Paris - eu-west-3
2017-12-19 10:00:03 +01:00
Matthew Hooker
f216330ba3
spot instance ena/sriov checking for all other builders
2017-12-08 14:56:19 -08:00
Matthew Hooker
73b98b2a04
use waiter to wait for ebs instances to stop
2017-12-08 13:38:48 -08:00
Matthew Hooker
dada63801b
also use waiter code for spot instances
2017-12-08 13:38:48 -08:00
Matthew Hooker
9e61005f7c
Merge pull request #5660 from hashicorp/fix_5625
...
modify validation to allow user to have the original region in the am…
2017-12-08 13:36:10 -08:00
Ben Gnoinski
5df2e040d0
Update amazon run_config.go absent ssh_private_key_file error
2017-12-08 08:51:27 -08:00