Create an Elastic IP in AWS console. Create a VM with _aws.elasticip set to the specific IP.
Do not create an Elastic IP. Create a VM with _aws.elasticip set to true. vagrant up the VM, change _aws.elasticip parameter to the IP that was created on vagrant up.
With the first scenario, if I destroy the VM via Vagrant, the Elastic IP is kept and when I up the VM, the IP is reassigned to the new instance (I do not change the Vagrantfile).
With the second scenario, if I destroy the VM via Vagrant, the Elastic IP gets destroyed as well and when I up the VM, I get the message "Elastic IP not available: x.x.x.x". So, I need to create a new Elastic IP and assign it, or relaunch the VM with _aws.elasticip set to true.
Is this behavior normal or am I missing something?
Creating Elastic IPs by hand is not hard, and there is not much point in changing the _aws.elasticip parameter instead of working with AWS for automatization reasons, I'm just curious.
Vagrant 2.1.1, Vagrant-AWS 0.7.2.
I have tried two scenarios:
With the first scenario, if I destroy the VM via Vagrant, the Elastic IP is kept and when I up the VM, the IP is reassigned to the new instance (I do not change the Vagrantfile).
With the second scenario, if I destroy the VM via Vagrant, the Elastic IP gets destroyed as well and when I up the VM, I get the message "Elastic IP not available: x.x.x.x". So, I need to create a new Elastic IP and assign it, or relaunch the VM with _aws.elasticip set to true.
Is this behavior normal or am I missing something?
Creating Elastic IPs by hand is not hard, and there is not much point in changing the _aws.elasticip parameter instead of working with AWS for automatization reasons, I'm just curious.