hashicorp / hashicorp/packer-plugin-amazon

amazon-import -> Import as snapshot?

Open
#103 3 comments 7 reactions 0 assignees View on GitHub
enhancement track-internal
Dominant language
Go
Stars
91
Forks
141
Avg merge
2d 18h
Merged PRs (30d)
3

Description

#### Community Note

Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

#### Description

Instead of only having the possibility of importing the artifacts as an amazon AMI, which has a lot of requirements, we should be able to import the artifact as a snapshot, which has almost no requirements and its not even postprocessed by aws.

It could even have an extra step to register the AMI from that snapshot afterwards thus turning the snapshot into an AMI

#### Use Case(s)

Any OS that does not adhere to the requirements list from importing images[0] could benefit from this. In our case this arise from building https://github.com/rancher-sandbox/cOS-toolkit and trying to use packer while building our artifacts for the different cloud providers. We tried to use amazon-import to upload the resulting OVA images but it kept failing until we used the import-snapshot method.

[0] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html

#### Potential configuration

```diff
{
"type": "amazon-import",
"access_key": "YOUR KEY HERE",
"secret_key": "YOUR SECRET KEY HERE",
"region": "us-east-1",
"s3_bucket_name": "importbucket",
"license_type": "BYOL",
+"snapshot": true,
+"register_snapshot": true,
"tags": {
"Description": "packer amazon-import {{timestamp}}"
}
}

```

#### Potential References
https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html
https://docs.aws.amazon.com/cli/latest/reference/ec2/register-image.html

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.