Hello,
I am a new user of vagrant. Currently I am trying to launch virtual instance in EC2 using vagrant aws plugin. But after done all the configuration I am getting following error.
$ vagrant up --provider=aws
Bringing machine 'delta' up with 'aws' provider...
==> delta: Warning! The AWS provider doesn't support any of the Vagrant
==> delta: high-level network configurations (`config.vm.network`). They
==> delta: will be silently ignored.
==> delta: Launching an instance with the following settings...
==> delta: -- Type: t2.micro
==> delta: -- AMI: ami-a7fdfee2
==> delta: -- Region: us-east-1
==> delta: -- Keypair: pratip.pem
==> delta: -- Block Device Mapping: []
==> delta: -- Terminate On Shutdown: false
==> delta: -- Monitoring: false
==> delta: -- EBS optimized: false
==> delta: -- Assigning a public IP address in a VPC: false
There was an error talking to AWS. The error message is shown
below:
VPCIdNotSpecified => No default VPC for this user
My Vagrantfile entry is as following:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :delta do |x|
x.vm.box = "hashicorp/precise64"
x.vm.hostname = "delta"
x.vm.provider :virtualbox do |v|
v.name = "delta"
end
x.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY']
aws.secret_access_key = ENV['AWS_SECRET_KEY']
aws.keypair_name = ENV['AWS_KEYNAME']
aws.ami = "ami-a7fdfee2"
aws.region = "us-east-1"
aws.instance_type = "t2.micro"
override.vm.box = "dummy"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = ENV['AWS_KEYPATH']
end
end
end
In my AWS account there is one VPC exist named as "test" and it is not a default VPC in my account.
Can anyone guide me how I specify my VPC ID in the vagrantfile?
Regards,
Pratip