Commit Graph

76 Commits

Author SHA1 Message Date
DanHam af7f7f2ce9
Fix redundant Sprintf 2018-05-24 21:05:03 +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 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
Josh Soref 0171dfc890 spelling: validating 2018-03-14 03:28:19 +00: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 f216330ba3
spot instance ena/sriov checking for all other builders 2017-12-08 14:56:19 -08:00
Ben Gnoinski 5df2e040d0 Update amazon run_config.go absent ssh_private_key_file error 2017-12-08 08:51:27 -08:00
John Davies-Colley 10aaa49beb fixing tests and funky logic 💦 2017-11-28 14:42:14 +13:00
John Davies-Colley 0c787ec9df Valadating early 2017-11-28 11:46:32 +13:00
John Davies-Colley 75320440ec adding missing quote 🙏 2017-11-22 15:59:15 +13:00
John Davies-Colley 707ec675b2 ssh interface for amazon builders 🔨 2017-11-22 15:49:38 +13:00
Matthew Hooker f7e269945e
add cidr validation and rename option 2017-10-12 17:05:56 -07: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 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker bd76b7bb6f
builder/amazon: validate ssh key name/file
When using ssh_key_name, ssh_private_key file must be given,
or ssh_agent_auth enabled.

When automatically retrieving the winrm password, if ssh_key_name is
given, ssh_private_key_file must also be given.
2017-03-13 13:14:18 -07:00
Richard Owen 33a4c2e13b Change EC2 WindowsPasswordTimeout to 20 minutes
10 minutes is often exceeded when using a custom source AMI
which has been sysprepped.
2017-02-24 11:08:17 +00:00
Matthew Hooker 800351b7ca
fix panic and don't print each tag we add. 2017-01-18 11:34:36 -08:00
Rickard von Essen d3c2239b9e
builder/amazon: Change shutdown_behaviour to shutdown_behavior 2016-12-14 21:59:16 +01:00
Rickard von Essen d16d5d9686 Merge pull request #3817 from ChrisLundquist/dynamic-source-ami
Dynamic source ami
2016-10-25 21:24:41 +02:00
Rickard von Essen acc2689b49
builder/amazon: Allow using ssh_private_key_file and ssh_password
This adds support for using amazon-ebs/amazon-instance builder without
a keypair. If a ssh_private_key_file is supplied without a
ssh_keypair_name no temporary ssh keypair is created. If ssh_password is
used no temporary ssh keypair is created and the password is used when
trying to connect.

Closes #2301
Closes #3156
2016-10-02 22:20:36 +02:00
Chris Lundquist defdd1ecf3 Merge remote-tracking branch 'origin/master' into dynamic-source-ami 2016-09-02 01:43:03 +00:00
Krzysztof Wilczynski d01fb65dcf Fix. Use temporary_key_pair_name when specified. (#3739)
Fix: Use temporary_key_pair_name when specified.

This is to fix an issue where the temporary_key_pair_name configuration option
for amazon-ebs and amazon-instance builders would be ignored and replaced with
an automatically generated value using UUID, even when the option was explicitly
specified.

Remove space from the auto-generated SSH key-pair name.

Resolves #3736
2016-08-25 09:17:57 +02:00
Chris Lundquist 3cc8d35450 [dynamic-source-ami] fix old key name in error message 2016-08-21 00:58:01 +00:00
Chris Lundquist 95afaa58ca [dynamic-source-ami] rename to source_ami_filter 2016-08-20 23:34:22 +00:00
Chris Lundquist 0e248f1516 [dynamic-source-ami] make most_recent work 2016-08-20 23:08:45 +00:00
Chris Lundquist ec1abb9448 [dynamic-source-ami] proof of concept 2016-08-20 18:58:36 +00:00
Chris Bednarski ab9621ab7d Added aws shutdown_behavior to the changelog 2016-06-14 14:34:01 -07:00
Patrick Robinson f361e1d894 Precompile regex 2016-06-14 14:29:10 -07:00
Patrick Robinson a9f914ea97 Add shutdown_behaviour option
This means an instance will terminate upon shutdown.
2016-06-14 14:29:10 -07:00
Chris Chalfant 8163e16e02 gofmt code 2016-03-14 13:49:42 -04:00
Chris Chalfant 72a7123a0b Add option to tell packer not to stop the instance
It is sometimes desirable to sysprep a windows machine before creating
an EC2 image. The AWS-approved way to do this is to run
ec2configservice.exe -sysprep and let ec2configservice shut down the instance.
This change adds an option to disable the stop instance call issued by packer
so that the user can control when the machine is stopped.
2016-03-14 12:54:03 -04:00
Adrian Bridgett 8349e22df9 Add ebs_optimized support 2015-10-06 21:36:21 +01:00
Mitchell Hashimoto de2004c1c9 Merge branch 'master' of https://github.com/nyetsche/packer into nyetsche-master 2015-06-15 15:21:58 -07:00
Mitchell Hashimoto fd4e0e9da4 builder/amazon: StepGetPassword 2015-06-13 22:35:45 -07:00
Mitchell Hashimoto e557928119 builder/amazon: use helper/communicator 2015-06-13 18:16:12 -04:00
Mitchell Hashimoto 50d7c598e9 amazon/ebs: use new interpolation stuff 2015-05-27 11:35:56 -07:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 43f08b2664 go fmt all the things 2015-01-13 22:58:41 -05:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 9d097f9d4e Permit Temp keys and named SSH keypairs
These changes permit the use of pre-created SSH keypairs with AWS. If
so, the configuration for the builder needs to include an
ssh_keypair_name option and a ssh_private_key_file.

If ssh_private_key_file is *not* defined, it'll go through the
rigamarole of creating a temporary keypair. The ssh_keypair_name option
by itself won't make that change, because it doesn't make sense to
specify a keypair but not tell packer where the private key is, but it
does happen that you could have a private key and the public-key is
"baked in", and not part of your EC2 account.
2015-01-13 16:27:33 -05:00
Lesko, Matthew (NIH/NLM/NCBI) [C] 8c87b1cc00 First attempt for re-using a named EC2 keypair
Adds a 'ssh_keypair_name' option to the configuration
for AWS, along with some munging to create the
temporarily keypair if one isn't specific.

NOT YET WORKING.

From a 'make' I get the following errors:

builder/amazon/ebs/builder.go:94: b.config.SSHKeyPairName undefined
(type config has no field or method SSHKeyPairName)

builder/amazon/instance/builder.go:199: b.config.SSHKeyPairName
undefined (type Config has no field or method SSHKeyPairName)
2015-01-13 13:12:04 -05:00
Mitchell Hashimoto db90c16118 builder/amazon: support auto spot price discovery [GH-1465] 2014-09-06 10:44:12 -07:00
Mitchell Hashimoto 2e5f3da5c1 builder/amazon: fix {{uuid}} default not being replaced 2014-09-05 16:38:05 -07:00
Mitchell Hashimoto 3a69b8c1b8 Merge branch 'add-spot-instance-support' of github.com:henrysher/packer into henrysher-add-spot-instance-support
Conflicts:
	builder/amazon/common/run_config.go
	builder/amazon/ebs/builder.go
	builder/amazon/instance/builder.go
2014-09-05 16:30:22 -07:00
Mitchell Hashimoto 0776d9de34 builder/amazon: ssh_private_ip [GH-1229] 2014-09-04 21:48:14 -07:00
Mitchell Hashimoto 2a9cb50b17 builder/amazon: fix broken build 2014-09-02 10:17:52 -07:00
Mitchell Hashimoto 825864a9ea Merge branch 'additional-user-variables' of github.com:nBerg/packer into nBerg-additional-user-variables
Conflicts:
	builder/amazon/common/run_config.go
2014-09-02 09:57:52 -07:00
Florian Noeding e932ec6978 amazon builders now handle templating of user_data and user_data_file 2014-07-17 17:45:25 +02:00
Nina Berg bd1a0d07fb Added some variables to amazon-ebs builder and chef-client provisioner 2014-07-08 13:15:17 -04:00