Skip to content

Instantly share code, notes, and snippets.

@dhs-rec
Created May 23, 2019 08:14
Show Gist options
  • Save dhs-rec/7084aa659a3fb77572299d02a209b5ff to your computer and use it in GitHub Desktop.
Save dhs-rec/7084aa659a3fb77572299d02a209b5ff to your computer and use it in GitHub Desktop.
{
"builders": [{
"type": "amazon-ebs",
"region": "eu-central-1",
"instance_type": "t2.xlarge",
"source_ami": "ami-029bb09da31cbfdfc",
"ami_name": "Encrypted AMI with Packer 1.4.1",
"communicator": "ssh",
"ssh_username": "ubuntu",
"associate_public_ip_address": false,
"profile": "YOUR AWS PROFILE HERE",
"encrypt_boot": true,
"kms_key_id": "alias/Namespace/keyname",
"ami_block_device_mappings": [
{
"device_name": "/dev/sda1",
"delete_on_termination": true,
"encrypted": true,
"volume_type": "gp2",
"volume_size": "8"
}
],
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"delete_on_termination": true,
"encrypted": true,
"volume_type": "gp2",
"volume_size": "8"
}
]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment