Skip to content

Add support for excluding data disks from the resulting image #141

Open
@Jalle19

Description

@Jalle19

The code contains this:

// TODO: We should allow user to specify which data disk should be
// included into created image.
var dataDiskIds []*string
for _, disk := range instance.DataDisks {
	dataDiskIds = append(dataDiskIds, disk.DiskId)
}
if len(dataDiskIds) > 0 {
	req.DataDiskIds = dataDiskIds
}

Currently if you include a data_disk block, you won't be able to sync the resulting image to other regions:

code:InvalidParameter.InstanceImageNotSupport message:Instance image `img-pf0wpk45` not support action `SyncImages`

As a comparison, the Packer amazon-ebs plugin supports the following option:

no_device (bool) - Suppresses the specified device included in the block device mapping of the AMI.

This excludes the specified launch mapping from the created image.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions