by scrollaway · 10y ago · 0 comments
I personally think using it was the right call regardless (the alternatives are worse in the long run), but it's such a massive upfront investment, I couldn't recommend it.
One thing though:
> tools that change their behavior based on files in one of the parent directories
You mean like git? I agree with your general sentiment but you're backing it up very weakly, with essentially irrelevant things. Terminal interactivity is not a bad thing; TUI software is built for humans as well as machines and well behaved components will detect when they are not in a tty.
> You mean like git?
In case of interactive tools like git it is something you would expect. But it came to me as a rather huge surprise that if you type "npm install" in a directory where you just unpacked sources, what will actually happen depends on what exists in the PARENT directory. Not to mention writing to the parent directory.
I am not alone in being caught off-guard by this: https://github.com/npm/npm/issues/2896
I'd say this is unacceptable in case of tools that are "make-like".
When I use git in a subdirectory of my project, it looks for .git/ up the directory tree until it finds it.
The state file is atrocious, a constant source of pain. It is hard to set up in the first place, it is hard to import resources into it, it is hard to rename resources within it.
Sometimes, resources don't canonicalize correctly and will always tell you there's something to modify, even though there isn't. Other times, resources don't destroy properly because you are using some untested settings within them.
"It's alpha software" is the best description I can give. It has a ton of rough edges.
The pros: It's decently fast, and a lot more workable than the alternatives (cloudformation or simply tracking stuff by hand). It supports more than just AWS, including fairly obscure stuff like Cloudflare DNS records. It's conceptually solid.
Don't say no to it outright, but you should know what you are getting into.
Btw, Terraform 0.7 comes with initial support for import and state manipulation commands.
Also you mentioned that Terraform was better than the alternatives. Could I ask what other alternatives you looked at and why you ended up choosing Terraform over them?
The reason I ask is that I am also considering Terraform. However other providers also seem to support more than just AWS and are fast enough.
Use the AWS API and your config management API ( chef ) to manage the state of the systems.
That is pretty much it right there.
I've yet to see another solution that beats it. Warts and all, it's the best I've seen.