Hello I have found the syntax to assign private and elastic IP address to the new ec2 instance.
- private_ip_address - The private IP address to assign to an instance within a VPC <http://aws.amazon.com/vpc/> - elastic_ip - Can be set to 'true', or to an existing Elastic IP address. If true, allocate a new Elastic IP address to the instance. If set to an existing Elastic IP address, assign the address to the instance. I want to assign public IP to the new ec2 instance which is not persistent IP. Is it possible through vagrantfile? Regards, Pratip On Tuesday, September 8, 2015 at 2:39:55 PM UTC+5:30, Pratip Ghosh wrote: > > Hello Alvaro, > > Thank you for your help. > > I have resolved the issue with adding *aws.subnet_id value *in my > Vagrantfile. > > Now another issue I am facing. > > As I am not connected my VPC using VPN so I need to assign a Public IP > through vagrantfile. > > > Regards, > Pratip > > On Tuesday, September 8, 2015 at 1:13:12 PM UTC+5:30, Alvaro Miranda > Aguilera wrote: >> >> Hello >> >> Can you check this past issue? There is a Vagrantfile with plenty of >> options for network >> >> https://github.com/mitchellh/vagrant-aws/issues/114 >> >> Thanks >> >> On Tue, Sep 8, 2015 at 7:23 PM, Pratip Ghosh <[email protected]> >> wrote: >> > 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 >> > >> > -- >> > This mailing list is governed under the HashiCorp Community Guidelines >> - >> > https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation >> > of those guidelines may result in your removal from this mailing list. >> > >> > GitHub Issues: https://github.com/mitchellh/vagrant/issues >> > IRC: #vagrant on Freenode >> > --- >> > 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]. >> > To view this discussion on the web visit >> > >> https://groups.google.com/d/msgid/vagrant-up/95d8e71e-d569-49c0-b4e3-89e4e1e61daf%40googlegroups.com. >> >> >> > For more options, visit https://groups.google.com/d/optout. >> > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/cf3787a2-107a-4d3f-9f0f-f2eff0024ec9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
