hashicorp / hashicorp/packer-plugin-amazon

Allow AMI block device mapping to be created without snapshot

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
bug builder/amazon enhancement
Dominant language
Go
Stars
91
Forks
141
Avg merge
2d 18h
Merged PRs (30d)
3

Description

_This issue was originally opened by @otterley as hashicorp/packer#5290. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


I have a use case where I have two `launch_block_device_mappings`, `/dev/sda1` (root device) and `/dev/sdb` (data device). The data device exists during the build phase to satisfy some build-time prerequisites, but the actual volume content can be discarded at the the end of the build. The device can also be quite small.

Meanwhile, there are two `ami_block_device_mappings` of the same device names, `/dev/sda1` and `/dev/sdb`. I'd like `/dev/sdb` NOT to be associated with a snapshot, since at launch time the instance should have a fresh volume. But Packer seems to always associate it with a snapshot because the device was mapped at launch time. Setting `snapshot_id` to `""` seems to have no effect.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.