Skip to content

Instantly share code, notes, and snippets.

@iainelder
Created November 26, 2016 14:48
Show Gist options
  • Save iainelder/f38bbbd6deeca0aafcf9e0bd7d3784cf to your computer and use it in GitHub Desktop.
Save iainelder/f38bbbd6deeca0aafcf9e0bd7d3784cf to your computer and use it in GitHub Desktop.
example.json for packer issue
{
"variables": {
"aws_access_key": "",
"aws_secret_keu": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-fce3c696",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "packer-example {{timestamp}}"
}],
"provisioners": [{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt-get update",
"sudo apt-get install -y redis-server"
]
}],
"post-processors": ["vagrant"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment