Commit Graph

36 Commits

Author SHA1 Message Date
Jason McIntosh 24bc50ce1b Enable encrypted AMIs with custom KMS Keys 2019-05-30 17:16:36 -05: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
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
Tom Elliff 12bf7fc4d6 Check that the KMS key ID is valid
KMS key IDs can be given as either a raw key ID, an alias (always prefixed with 'alias/'), the full ARN to the KMS key ID or the full ARN to the KMS key alias.

Should help with https://github.com/hashicorp/packer/issues/6599 but probably isn't enough to fully close it.
2018-12-12 11:41:58 +00:00
Megan Marsh da6e350949 fix tests 2018-11-20 15:20:01 -08: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 d4767845f0 fix tests 2018-10-16 15:01:13 -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
Megan Marsh 1c681fc096 tests 2017-11-30 14:08:48 -08:00
Matthew Hooker 0e4ea7420b
fix tests 2017-10-30 14:34:16 -07:00
Megan Marsh 875745ab9b one more test 2017-05-31 14:16:02 -07:00
Megan Marsh 1944f38985 update docs and clean up 2017-05-31 13:41:32 -07:00
Megan Marsh f9d7292566 builder/amazon regional KMS keys 2017-05-31 11:23:18 -07:00
Megan Marsh 7174a7a3d5 New map: region_kms_key_ids, allowing custom encryption keys on a per-region basis. Also new tests. 2017-05-25 14:42:03 -07:00
Matthew Hooker 4137660b7a
fix ami name validation 2017-05-19 02:11:43 -07:00
Matthew Hooker da8c4004f0
builder/amazon: numbers are valid in ami name 2017-04-05 12:39:16 -07:00
Matthew Hooker 3f6b5165f2
add affirmative test case for #4762 2017-04-04 22:08:09 -07:00
Craig Barr d9041bda0c Improved the test for special character so that it doesn't get halted by less than 3 character check 2017-04-05 11:06:59 +10:00
Craig Barr 7911cfa94b Formatting as per make fmt 2017-04-05 11:02:23 +10:00
Craig Barr df6337e8ab Added AMIName validation (issue 4761) 2017-04-05 10:46:44 +10:00
Rickard von Essen d7a7d8c852
It's not possible to share encrypted AMI's 2016-12-04 15:52:23 +01:00
poida 8b13b75097 Updated documentation and error messages
The docs for kms_key_id needed to be next to encrypt_boot.

Shortened some of the kms_key_id error messages.
2016-12-03 07:49:54 +11:00
poida 7ea17e1630 Allow custom encrypted AMIs to be shared
When using a custom KMS key to encrypt the boot volume of an AMI, packer should allow it to be shared with other users.
2016-12-03 07:49:54 +11:00
Ali Hamidi c6a527dc46 throw error if encrypted ami is shared 2016-07-29 15:01:24 -07:00
owjjh de5b69a8df Adding ability to skip region validation when using AWS 2016-06-06 14:17:12 -04:00
Chris Bednarski 0cad32c696 Move region list into a function so we can re-use it in tests 2016-01-12 19:03:21 -08:00
Chulki Lee 1aa24035fc add ap-northeast-2: Asia Pacific (Seoul) 2016-01-11 13:05:18 -08:00
Chulki Lee 7f3f5f4bfa add tests for all ami regions 2016-01-11 13:02:38 -08:00
Mitchell Hashimoto a4f674f8ed builder/amazon/common: remove duplicates from ami_region
/cc @jmassara
2013-08-22 14:58:21 -07:00
Mitchell Hashimoto bfc2ac1eaa builder/amazon/common: AMIConfig common config
/cc @jmassara - I pulled out the AMI stuff into a common config
struct and also added in the new template stuff (that didn't exist
when you made the pull, so not your fault! :))
2013-08-08 22:50:37 -07:00