The amazon and digital ocean providers are plugins to the vagrant core project. As such they may not provide the same interface. The aws plugin may not support creating new ssh keys like the digital ocean one does.
On Tue, Sep 30, 2014 at 2:53 PM, <[email protected]> wrote: > Hello, > > When I provision a digital ocean droplet, I can instruct the vagrant > digital ocean plugin to upload my ssh public key, so that I can ssh in. > However, I cannot figure out how to do that with Amazon AWS. Here is my > Vagrantfile: > > Vagrant.configure('2') do |config| > config.ssh.insert_key = true > config.ssh.private_key_path = '~/.ssh/id_rsa' > config.vm.provider :digital_ocean do |provider,override| > override.vm.box = 'digital_ocean' > override.vm.box_url = > 'https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box' > provider.token = ... > provider.region = 'sfo1' > provider.size = '512mb' > provider.ssh_key_name = 'test' > provider.name = 'test' > end > config.vm.provider :aws do |aws,override| > override.vm.box = 'dummy' > override.vm.box_url = > 'https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box' > aws.access_key_id = ... > aws.secret_access_key = ... > aws.ami = 'ami-d30042e3' > aws.region = 'us-west-2' > aws.instance_type = 't2.micro' > aws.security_groups = ['default'] > aws.keypair_name = 'test' > override.ssh.private_key_path = '~/.ssh/id_rsa' > end > config.vm.provision 'ansible' do |ansible| > ansible.playbook = 'ansible/base.yaml' > end > end > > > When I run 'vagrant up --provider=digital_ocean', this works perfectly. > It creates a new key pair called 'test' and sets up the instance to use > it. However, 'vagrant up --provider=aws' returns the error: "The key pair > 'test' does not exist". Is this not supported by the aws plugin? Or am I > doing something wrong? > > Thanks, > Jason > > > > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
