This PR adds the ability for Packer to clean up snapshots in addition to
deregistering AMIs at build time.
To test this, I used the following `test.json` file:
```json
{
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami": "ami-fce3c696",
"ami_name": "packer-test",
"instance_type": "m3.medium",
"ssh_username": "ubuntu",
"vpc_id": "some-vpc-id",
"subnet_id": "some-subnet-routed-through-igw",
"security_group_id": "some-security-group-with-port-22-access",
"force_delete_snapshot": true
}
],
"provisioners": [
{
"type": "shell-local",
"command": "echo 'hello'"
}
]
}
```
I appreciate any constructive feedbakc that can be given. Cheers!
Previously, groups were granted launch permissions by submitting a
ModifyImageAttribute request with the UserGroups parameter set
appropriately. This is no longer valid, as the LaunchPermission
parameter must be set.