Commit Graph

36 Commits

Author SHA1 Message Date
Megan Marsh 035c3506ba manually set proxyfromenvironment in default http client for ec2 sessions 2019-01-25 12:33:25 -08:00
Rickard von Essen a02bd23f56
When import task fails show the StatusMessage
This will hopefully tell the user the reason of the failure.
2019-01-17 13:36:44 +01:00
Megan Marsh 042e9ad14b Move logging about aws waiters to the access config prepare() so that it's only spit out once per builder. 2018-12-06 14:37:31 -08:00
Adrien Delorme b113518815
Use switch for readability
Co-Authored-By: c0sco <778087+c0sco@users.noreply.github.com>
2018-10-30 10:06:31 -07:00
Matt Stofko 029819b5d5 Support formats other than OVA. 2018-10-29 14:52:12 -07: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 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 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
Matthew Hooker 48e12b6bee
only set role name if it's set. 2018-01-25 10:39:21 -08:00
Brian Terry 380147200c Added role in amazon-import 2018-01-25 10:56:30 -05: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
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
Matthew Hooker 56c513088b
I think this was the intention 2017-06-09 10:34:49 -07:00
Matthew Hooker a52cd65af8
remove license type from general debugging 2017-06-05 15:27:33 -07:00
Brian Warsing 8cc4558df9 fix bad conditional logic and assignment 2017-05-24 13:22:46 -07:00
Brian Warsing 47df47c73f conform ImportImage LicenseType behaviour
- remove the synthetic default; defaults are established internally by the func
- store ImportImageInput in params var
- only pack the LicenseType into struct if a value has been set
2017-05-24 11:33:21 -07:00
Brian Warsing c5dfe3d503 amazon-import post-processor: support license_type
Implements a new config option for the amazon-import post-processor
allowing users to specify a LicenseType during the import process.

Closes: #4631
2017-05-24 11:30:24 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 6f27f67346
more fixes from errcheck 2017-03-29 13:38:31 -07:00
Matthew Hooker 230079f73a
spell fixes 2017-03-28 20:36:19 -07:00
Zanetti, David c22b97dd43 Support setting AMI attributes when using amazon-import post-processor
- ami_user and ami_group for launch permissions
- ami_description to set the description attribute

Closes #3981
2016-11-29 16:54:02 +13:00
Matthew Hooker 48bdae93d1 aws-sdk: use session.NewSession 2016-11-01 15:53:04 -07:00
Rickard von Essen 3c8dabba9e Fixed formatting 2016-10-11 23:43:50 +02:00
Ian Duffy 641ae2d837
Allow naming of vm imported AMIs
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-09-29 16:12:57 +01:00
Chris Bednarski 0f319fde08 Add debug logging for the credentials used for S3 in amazon-import 2016-03-10 16:52:16 -08:00
Chris Bednarski 4458de4ea0 Reformat 2016-02-11 23:53:40 -08:00
David Zanetti a3911ad47c Use interpolation on default s3_key_name. Report import errors from AWS.
- Import errors were not very useful messages, obtain the import status
  from the import task as AWS reports it
- Interpolate s3_key_name as per PR comments (rather than hard-code the
  generated parts of the default value)
- Remove descriptions on AWS import job, they are optional anyway.
2015-11-26 14:02:15 +13:00
David Zanetti 873dc89478 Accept any OVA. Fix names for tasks/import/copy. Update docs.
- s3_key_name is now optional, default is equivilent to
  "packer-import-{{timestamp}}"
- Remove restriction on builder used, anything producing an OVA is okay
- Fix task and ova description passed to import API call, correctly
  adds timestamp to both
- Documentation updated
  - Remove VMware-specific text
  - Mark s3_key_name as optional
  - Remove s3_key_name from example now it's optional
  - Explain the import process more clearly in example
2015-11-25 10:06:35 +13:00
David Zanetti 274630bd9c Support adding tags to AMI and snapshots created by amazon-import
- Tags follows the same approach as the amazon-ebs builder
- Clean up some debug messages
- Improve readability by pulling out AMI id into seperate variable

Note: this duplicates the tag creation code in
builder/amazon/common/step_create_tags.go. Maybe this should be a multistep
post-processor instead, and we re-use steps from the builder.
2015-11-24 14:23:19 +13:00
David Zanetti 95b3ea50ae Add more useful messages and clean up after ourselves
- S3 object uploaded removed after import (with disable option)
- Indicate to user when import is complete
- Close the source file uploaded after upload is done
- Each step of import process logs a debug message
2015-11-24 12:08:31 +13:00
David Zanetti 418da16991 Track the import task and report AMIs created from it 2015-11-23 15:55:09 +13:00
David Zanetti 439d1b1788 First cut at amazon ova importer 2015-11-23 12:32:03 +13:00