Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Elastic IP gets released when destroying VM that had elastic_ip set to true and reassigned afterwards #546

Open
ex3m1024 opened this issue Jul 6, 2018 · 0 comments

Comments

@ex3m1024
Copy link

ex3m1024 commented Jul 6, 2018

Vagrant 2.1.1, Vagrant-AWS 0.7.2.

I have tried two scenarios:

  1. Create an Elastic IP in AWS console. Create a VM with aws.elastic_ip set to the specific IP.
  2. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant