Skip to content

Instantly share code, notes, and snippets.

@karl-cardenas-coding
Created March 19, 2019 02:11
Show Gist options
  • Select an option

  • Save karl-cardenas-coding/5f1936657862afed018ac36c3079be55 to your computer and use it in GitHub Desktop.

Select an option

Save karl-cardenas-coding/5f1936657862afed018ac36c3079be55 to your computer and use it in GitHub Desktop.
Packer template
{
"builders": [{
"type": "amazon-ebs",
"ami_name": "${ami-name}-{{isotime \"Jan-02-06\"}}",
"instance_type": "${instance_type}",
"region": "${region}",
"source_ami": "${source_ami}",
"security_group_ids": ["${security_groups}"],
"ssh_username": "${ssh_username}",
"iam_instance_profile": "${instance_profile}",
"profile": "${profile}",
"vpc_id": "${vpc_id}",
"subnet_id": "${subnet_id}",
"ami_users": ["${accounts}"],
"tags": {
"Name": "${ami-name}-{{isotime \"Jan-02-06\"}}",
"Base_AMI_Name": "{{ .SourceAMIName }}",
"OS": "${os}"
}
}],
"provisioners": [{
"type": "shell",
"script": "${script}"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment