hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
75 stars 112 forks source link

Add support for fast snapshot restore #463

Open ziggythehamster opened 8 months ago

ziggythehamster commented 8 months ago

Community Note

Please vote on this issue by adding a 👍 reaction 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

When images are taken and snapshots copied, Packer users should be able to enable EBS fast snapshot restore on those snapshots for some list of availability zones. Note that the list of AZs would be per snapshot, which could span regions, so the configuration syntax might get a little hairy.

Use Case(s)

Make instance launches not suffer from the degraded performance that comes with launching from an AMI or EBS snapshot while the volume is initializing.

Potential configuration

source "amazon-ebssurrogate" "foo" {
  ami_regions = ["us-east-1", "us-west-2"]

  ami_fast_snapshot_restore {
    region             = "us-east-1"
    availability_zones = ["us-east-1a", "us-east-1b"]
  }

  ami_fast_snapshot_restore {
    region             = "us-west-2"
    availability_zones = ["us-west-2a", "us-west-2b"]
  }
}

Potential References

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-fast-snapshot-restore.html

github-actions[bot] commented 7 months ago
This issue has been synced to JIRA for planning.
JIRA ID: [HPR-1705](https://hashicorp.atlassian.net/browse/HPR-1705)
lbajolet-hashicorp commented 7 months ago

Hi @ziggythehamster,

Thanks for the suggestion, we've added that issue to our internal tracker, this is definitely something we'll work on eventually. As always though if you're open to the idea, feel free to open a PR with this implementation, we'll gladly review and help if needed.