Megan Marsh
6ad975f296
Revert "move SSHInterface/SSHIPVersion fields to communitator.Config struct"
...
This reverts commit b0c09087a2
.
2019-07-02 10:46:10 -07:00
Megan Marsh
42611e6004
fix build
2019-07-01 13:03:33 -07:00
Megan Marsh
a60f7e395e
add a test to make sure we don't error becaue of spot price auto product, yet
2019-07-01 13:01:41 -07:00
Megan Marsh
c722afe707
stop calculating spot bids; amazon changed the way spot instances are priced to be stable rather than bid-based, so when user sets auto, we can just default to the ondemand price and know that they'll get the same price as everyone else bidding at that time.
2019-07-01 13:01:41 -07:00
Daniel Rodgers-Pryor
8a9753032c
Allow EC2 fleet packer instances to run in parallel
...
Without conflicting over the name of the launch template that they create/delete.
Previously, the launch template name was just hard coded to `packer-fleet-launch-template`, but since AWS enforces unique template names within an account, this caused simultaneously running packer instances to hit template-already-exists errors when creating their templates and race-conditions around deleting the template. Now, the template name is randomly generated on each run, so there should be no conflicts.
2019-06-30 16:19:35 +10:00
Megan Marsh
305592d8ed
fix copy logic and tests
2019-06-17 15:38:28 -07:00
Megan Marsh
8cc82ca8d2
add broken test
2019-06-17 15:04:19 -07:00
Megan Marsh
0d55bc46ee
add skip_save_build_region flag to fix naming conflicts when building for multiple regions
2019-06-17 14:39:11 -07:00
Megan Marsh
1c3b234b55
Merge pull request #7737 from hashicorp/document_retry
...
retry.Backoff: document
2019-06-13 10:54:08 -07:00
Adrien Delorme
98206d59d7
aws: step_create_tags make the max waiting time 30s and not 30ns
2019-06-11 12:37:52 +02:00
Pratyush Singhal
d92e82c43f
refactor: replace the maxBackoff from 30 nanosecond to 30 seconds
...
Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
2019-06-11 16:01:03 +05:30
Pratyush singhal
d4b0cb68e3
feat: add retry for temp key-pair generation in amazon-ebs
...
Signed-off-by: Pratyush singhal <psinghal20@gmail.com>
2019-06-10 22:45:02 +05:30
Megan Marsh
3f036b33c5
test for length of ami tags before tagging
2019-06-03 19:14:06 -07:00
Megan Marsh
078d888dba
Merge pull request #7707 from CARFAX/master
...
Enable encrypted AMI sharing across accounts
2019-06-03 13:08:06 -07:00
Jason McIntosh
abef9820c7
Fixed spacing on comment
2019-05-30 17:25:36 -05:00
Jason McIntosh
24a4e2f23e
Updated comments
2019-05-30 17:18:33 -05:00
Jason McIntosh
24bc50ce1b
Enable encrypted AMIs with custom KMS Keys
2019-05-30 17:16:36 -05:00
Megan Marsh
6786c0d641
update tests to reflect new behavior
2019-05-30 16:17:23 -05:00
Megan Marsh
bda09bf7d5
the build ami is made with an intermediary name, which means that we can't skip copying even from the original build region when unencrypted
2019-05-24 15:08:20 -07:00
Megan Marsh
708165eaa8
refactoring step_run_spot_instance and swapping out the calls to create a spot instance with a call to create a spot fleet of one, so that we can be more flexible with the instance type when desired
2019-05-24 09:32:54 -07:00
Megan Marsh
1062295ecd
add omit_from_artifact option for ebssurragote launch_block_devices
2019-05-10 11:12:11 -07:00
Megan Marsh
2c352cc681
add tests for step_ami_region_copy
2019-05-03 14:47:09 -07:00
Megan Marsh
8c1d0f9686
clean up temporary unencrypted AMI and associated snapshots
2019-05-02 14:20:26 -07:00
Megan Marsh
c0e69a9da0
if encrypt_boot is explicitly set to false, don't copy. Also, make sure we don't cause a wait group block when we aren't performing a copy.
2019-05-02 13:28:43 -07:00
Megan Marsh
105d3f8853
delete unencrypted temporary snapshot when encrypt_boot is true. Also, fix nil map error in region copy
2019-04-17 12:55:30 -07:00
Megan Marsh
201c8c1332
make sure that you encrypt using the provided kms key id and not the default
2019-04-15 16:44:56 -07:00
Adrien Delorme
d72040f4fa
move retry code into the common/retry pkg and make retry context aware
2019-04-09 17:46:38 +02:00
Adrien Delorme
a81abd297b
Merge remote-tracking branch 'origin/master' into context_provisioner
2019-04-08 20:09:01 +02:00
Megan Marsh
3e72e65a6c
Merge pull request #7456 from hashicorp/do_5770
...
introduce the clean_resource_name to clean image/var names
2019-04-05 09:12:20 -07:00
Adrien Delorme
c4f3dccc14
rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts
2019-04-03 15:56:15 +02:00
Adrien Delorme
a4bf94dd3c
change Builder to be passed a context for cancellation
...
we have to to give it to our hook
2019-04-03 15:55:55 +02:00
Adrien Delorme
9836dad0c9
introduce the clean_resource_name to clean image names and deprecate the old ones
2019-04-03 11:25:51 +02:00
Akshat Mahajan
f07e4214cc
Addresses issues #5384 , #5494 : Rename and change `temporary_security_group_source_cidr`
...
to accept a list of strings (for Amazon builders).
Per this change, `temporary_security_group_source_cidr` in the configuration:
1. Will be renamed to `temporary_security_group_source_cidrs`.
2. Will accept a list of CIDRs.
3. Will have its documentation updated to reflect this change.
4. Will have a fixer attached for newer templates to avail of.
2019-03-30 15:47:03 -07:00
programmer04
596a9cc7ff
Improve error message for AWS and Alibaba
2019-03-15 23:38:05 +01:00
Megan Marsh
3ed9fe6dee
remove unused imports
...
remove HttpClientWithEnvironmentProxy from amazon builders; let access config handle it
2019-03-04 16:42:33 -08:00
Megan Marsh
ca9a5daf29
fix proxy and tls
2019-03-04 16:41:31 -08:00
Adrien Delorme
f535464097
up a test
2019-02-27 11:17:56 +01:00
Adrien Delorme
f03cbd8a10
aws: allow to pass nil bool as encryption parameter
...
to retain current encryption settings
this changes the fields :
* ami_config.encrypt_boot
* block_device.encrypted
This also removes StepCreateEncryptedAMICopy as this step is now done in StepAMIRegionCopy
2019-02-27 11:17:56 +01:00
Adrien Delorme
ce8532e94b
aws: document ValidateRegion better
2019-02-27 11:17:08 +01:00
Adrien Delorme
6af621c37a
aws: StepAMIRegionCopy call waitgroup.add only once
2019-02-27 11:17:08 +01:00
Michael F
01a0b0c766
kmsArnStartPattern - fix support for aws-us-gov
...
While the `kmsArnStartPattern` regexp supports `us-gov` as a region, it does not take the AWS partition into consideration.
For more info see https://docs.aws.amazon.com/govcloud-us/latest/ug-east/using-govcloud-arns.html
Added test case for AWS partition us-gov as well as a negative test case for a non-existing AWS partition.
2019-02-26 16:54:54 -08:00
Megan Marsh
026e543b24
move snapshot deletion to cleanup; this allows people with tag-specific permissions to perform snapshot deletion operation
2019-02-25 17:01:19 -08:00
Megan Marsh
2a613dd6e9
fix up the github suggestion
2019-02-11 11:49:17 -08:00
Adrien Delorme
3ae5a912d4
Update builder/amazon/common/step_pre_validate.go
...
Co-Authored-By: SwampDragons <megan@hashicorp.com>
2019-02-11 11:41:58 -08:00
Megan Marsh
3704a053d0
move region validation and credential wait into step pre validate
2019-02-05 14:07:04 -08:00
Megan Marsh
8add176ab7
finish first pass at vault code; needs testing and cleanup of error messages
2019-02-04 15:54:14 -08:00
Megan Marsh
7a78b47e83
make vault engine stuff into a little struct for easier management
2019-02-04 15:29:45 -08:00
Megan Marsh
035c3506ba
manually set proxyfromenvironment in default http client for ec2 sessions
2019-01-25 12:33:25 -08:00
Adrien Delorme
4a2773f8fa
remove default max retries config of 8, it will now be used from env
...
removing the code that wants to guess region from metadata allows us to change that setting, which can now be taken from environment.
2019-01-25 13:51:02 +01:00
Adrien Delorme
964b149df2
aws: remove now unused AccessConfig.metadataRegion
2019-01-25 13:03:14 +01:00