Elastic IP gets released when destroying VM that had elastic_ip set to true and reassigned afterwards
ex3m1024 opened this issue · 0 comments
Vagrant 2.1.1, Vagrant-AWS 0.7.2.
I have tried two scenarios:
- Create an Elastic IP in AWS console. Create a VM with aws.elastic_ip set to the specific IP.
- Do not create an Elastic IP. Create a VM with aws.elastic_ip set to true. vagrant up the VM, change aws.elastic_ip 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.elastic_ip 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.elastic_ip parameter instead of working with AWS for automatization reasons, I'm just curious.