top | item 31539160

(no title)

Jasp3r | 3 years ago

Why would renaming be impossible to solve by a stateless terraform? In a cloud setup with 3 VMs, and you rename 1 VM from A to B:

Measured cloud setup would have VMs A + X + Y

New cloud setup would specify VMs B + X + Y

You can easily identity X and Y as their names go unchanged, A and B would have similar config/metadata, instead of assuming A would be added and B would be removed you can ask the user if a rename happened.

This is not a new problem to solve by the way, this is how database migration tools handle column renames.

discuss

order

cassianoleal|3 years ago

In this scenario, you'll have to manage your entire infrastructure from a single Terraform run.

In most places I've been, Terraform is scattered, each run managing its own corner of the infrastructure. In this case, each Terraform run would delete everybody else's infrastructure.

Also, how do you know when to re-create things like random strings or numbers? Or null resources? Presently it's a mix of keepers (requires state) and taint (also requires state).

ImPostingOnHN|3 years ago

as a user, I don't want to be asked to interactively guide what is supposed to be automated as its entire raison d'etre