dev4vater / vater

11 stars 4 forks source link

Setting Networks with Packer #272

Open Timo604 opened 2 years ago

Timo604 commented 2 years ago

Documenting a conversation had with rylagek about this:

Currently packer leaves the templates on the NEO_SPRN_LAN network, but with the static IP for when it get moved onto the range network.

This should be fine as when terraform does the networking the network should be changed to whatever it should be. It may be worth looking into if packer can handle that, but we don't think its possible or should be done for the following reasons:

  1. Packer setting the network is outside its expected responsibilities. Terraform should be handling that
  2. Packer giving the interface the static IP means it shouldn't matter what network gets plugged into that interface
  3. It would take weird configuration with packer to give the shutdown signal, assign the static IP, and then "swap the cables". It's inelegant and almost certainly unnecessary