Suggested change to AmazonEbsSurrogate to fix unknown configuration key error and expected map got slice error #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
https://www.packer.io/docs/builders/amazon-ebs
Issue 1:
Amazon EBS has no valid parameter "source_device_name" and packer will fail to build any template generated with AmazonEbsSurrogate.
Packer validate output from Packerlicious.AmazonEbsSurrogate fails with
unknown configuration key: '"source_device_name"'
Issue 2:
Packer expects a single ami_root_device and not a list of them. AmazonEbsSurrogate requires the ami_root_device to be a list of BlockDeviceMapping, when outputing packer template from packerlicious AmazonEbsSurrogate, the template fails with:
* 'ami_root_device' expected a map, got 'slice'
List of Changes Proposed
Change prop of AmazonEbsSurrogate to only expect single BlockDeviceMapping on the key ami_root_device and remove the prop source_device_name completely from AmazonEbsSurrogate.
Testing Evidence
packer validate before removing source_device_name
Before changes:
After changes: