Sorta. Creation is only easy if you know what the expected state is. Did you just create a new table, or was it already created? This is especially hard when you /want/ table names that are not stable.
Re:Terraform should have remained stateless
by jakelazaroff on Saturday May 28, 2022 @01:32AM
(#31537867)
You mean with regard to renaming, right? If your database has table `foo` and your config has table `bar`, did you mean to create a new table `bar` or rename your existing table `foo` to `bar`?
That, but also just managing that I want a stack to create a new table that I will logically refer to as "foo" in the stack. Outside the stack, I actually /don't/ want anyone referencing the table. Such that I expect the physical name to have a guid or some such. If you do that, it /has/ to keep track of which table it created, versus which were already there. (Right?)
Re:Terraform should have remained stateless
by nathants on Saturday May 28, 2022 @01:51AM
(#31537945)
using names to uniquely identify infrastructure is very convenient and how most of aws already works. why not take advantage of that instead mapping name to uuid via state? in what scenario are non-stable infrastructure names useful?
It certainly isn’t how “most” of AWS works. Nothing makes the name tags for important APIs like VPC or EC2 even exist, yet alone be unique. They use provider-assigned IDs instead.
Re:Terraform should have remained stateless
by nathants on Saturday May 28, 2022 @11:54AM
(#31541303)
vpc and ec2 are the big ones. they both support tagging atomically during create though, so it’s fine?
for ec2 i’m not sure i’d want unique names per instance. typically i prefer groups of instances with the same name.
If you are using cloud formation, it already does a uuid like name on resources it creates.
what if it’s stateful infrastructure like a db, and contains important state? is it already backed up? would it be expensive to restore? what else aren’t we thinking of.
even in a stateful model, deletion of top level, especially stateful, infrastructure should ALWAYS happen later, and maybe not happen at all.
creation is easy. deletion is it depends.