Skip to content

Instantly share code, notes, and snippets.

@akskap
Created April 16, 2020 23:21
Show Gist options
  • Save akskap/5faa30d36cd4e7558d67d66af60259bb to your computer and use it in GitHub Desktop.
Save akskap/5faa30d36cd4e7558d67d66af60259bb to your computer and use it in GitHub Desktop.
Packer AMI Builder Template
{
"variables": {
"region": "eu-central-1"
},
"builders": [
{
"profile": "<AWS_CRED_PROFILE_NAME>",
"ami_name": "Gitlab-Runner-{{timestamp}}",
"instance_type": "t2.micro",
"vpc_id": "<VPC_ID>",
"subnet_id": "<PUBLIC_SUBNET_ID>",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "amzn2-ami-hvm-2.0.20200406.0-x86_64-ebs",
"root-device-type": "ebs"
},
"owners": ["137112412989"],
"most_recent": true
},
"ssh_username": "ec2-user",
"type": "amazon-ebs"
}
],
"provisioners": [
{
"type": "shell",
"script": "./provision.sh"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment