Skip to content

Instantly share code, notes, and snippets.

@arslan70
Created January 14, 2021 07:43
Show Gist options
  • Save arslan70/4d15d4b6fdce9eccc60108293fc7db93 to your computer and use it in GitHub Desktop.
Save arslan70/4d15d4b6fdce9eccc60108293fc7db93 to your computer and use it in GitHub Desktop.
packer.json
{
"builders": [
{
"type": "amazon-ebssurrogate",
"region": "{{user `region`}}",
"ssh_username": "ec2-user",
"instance_type": "{{user `instance_type`}}",
"source_ami": "{{user `source_ami`}}",
"ami_architecture": "arm64",
"ami_name": "ami-{{isotime \"2006-01-02 03.04.05\"}}",
"ami_virtualization_type": "hvm",
"ena_support": "true",
"launch_block_device_mappings": [
{
"volume_type": "gp2",
"device_name": "/dev/xvdf",
"delete_on_termination": true,
"volume_size": 100
}
],
"ami_root_device": {
"volume_type": "gp2",
"source_device_name": "/dev/xvdf",
"device_name": "/dev/xvda",
"delete_on_termination": true,
"volume_size": 16
},
"vpc_filter": {
"filters": {
"tag:Name": "vpc",
"isDefault": "false",
"cidr": "{{user `vpc_filter_cidr`}}"
}
},
"subnet_filter": {
"filters": {
"tag:Name": "vpc-a-public"
},
"most_free": true,
"random": false
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment