Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

aws key outside the vagrant file so that can be in source control [easy] [documentation] [enhancement] #182

Closed
ZeerDonker opened this issue Jan 7, 2014 · 2 comments

Comments

@ZeerDonker
Copy link

Hello,

Do you think it would be a good idea to have something in the documentation, for the people who put their Vagrantfile in their source control, to not put their keys in source control?

Something along the lines of:

If you want to put your aws enabled Vagrant file in your source control you might want to put the aws keys in an external file in the following manner.

Vagrant.secret file that is not in your source control system:

$aws_key_id = "Personal aws.access_key_id"
$aws_secret = "Personal aws.secret_access_key"

The aws keys in the Vagrant file that is in source control:

external = File.read '../Vagrant.secret'
eval external 
      aws.access_key_id = $aws_key_id
      aws.secret_access_key = $aws_secret
@tmatilai
Copy link
Contributor

tmatilai commented Jan 7, 2014

👍 for documentation improvements. But the most common way seems to be to use environment variables (which you can read from a file in your shell rc files etc.). For example:

  aws.access_key_id     = ENV['AWS_ACCESS_KEY']
  aws.secret_access_key = ENV['AWS_SECRET_KEY']

I put my default config globally in ~/.vagrant.d/Vagrantfi and in aws base boxes so I can easily spin up basically what ever Vagrant project in aws even if the project doesn't have any aws specific configuration.

@rtyler
Copy link
Collaborator

rtyler commented Apr 2, 2014

I'm going to cover this in fixing issue #151, so I'll close this as a redundant ticket

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants