Skip to content

Instantly share code, notes, and snippets.

@Caesarsage
Created July 15, 2022 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Caesarsage/acd419178acec18010a2f5bc51996cec to your computer and use it in GitHub Desktop.
Save Caesarsage/acd419178acec18010a2f5bc51996cec to your computer and use it in GitHub Desktop.
Packer configuration for custom image
{
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `access_key` }}",
"secret_key": "{{user `secret_key` }}",
"region" : "us-east-1",
"ami_name" : "myfirstami",
"source_ami" : "{{user `source_ami` }}",
"instance_type" : "t2.micro",
"ssh_username" : "ec2-user"
}
],
"provisioners": [
{
"type": "shell",
"script": "setup.sh"
}
],
"post-processors": [
{
"type": "manifest",
"output": "{{user `description`}}.json"
}
],
"sensitive-variables": [
"secret_key",
"access_key"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment