V
V
VITYA-XY12020-11-16 01:32:07
Amazon Web Services
VITYA-XY1, 2020-11-16 01:32:07

What is the order of creating VPC Gateway and EC2 in terraform?

There are 2 modules "vpc" - creates a grid with a gateway, "ec2" - creates a virtual machine that is tied tightly to the public ip of the allocated gateway, i.e. if you try to deattach the gateway from the vpc, aws starts swearing about binding to an existing public ip.
Question: how to change the vpc (without killing the virtual machine), if the gateway is relayed to a dedicated ip address, for the release of which you need to kill the virtual machine? Do not allocate public ip?

Suppose we change the approach itself and create an ELB + AutoScaling group, which we will access by cname, but it will also be tied to vpc, will there be a conflict when changing the network configuration?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-11-16
@VITYA-XY1

Someone is doing something across a well-known place. Stop using ip and start using domain name. In addition, VPC is naturally a virtual network. You cannot move a virtual machine from one network to another. Take route53 and direct the domain name to the right place, and doing it through publicIP, ElasticIP or Load Balancer is the third thing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question