Skip to content

Instantly share code, notes, and snippets.

@tmatilai
Last active December 28, 2015 19:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tmatilai/7553092 to your computer and use it in GitHub Desktop.
Save tmatilai/7553092 to your computer and use it in GitHub Desktop.
Example Vagrant box for AWS provider

Install

tar -czf debian-7.box metadata.json Vagrantfile
vagrant box add debian-7 debian-7.box

Update

When the AMIs change, the easiest it to edit the basebox configuration directly in ~/.vagrant.d/boxes/debian-7/aws/Vagrantfile. You can also use --force option to replace the old box.

{
"provider": "aws"
}
Vagrant.configure('2') do |config|
config.ssh.username = 'admin'
config.vm.provider :aws do |aws, override|
# Debian Wheezy 7.4 x86_64 EBS
aws.region_config 'eu-west-1', ami: 'ami-9ef001e9'
aws.region_config 'us-east-1', ami: 'ami-d3675dba'
aws.region_config 'us-west-1', ami: 'ami-6ed3ee2b'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment