3 ms·
Thanks everyone at Hashicorp! This tool looks awesome. I wish it had been around years ago so I might have a nice version-controlled set of configuration files
by clarkdave 12y ago
Thanks everyone at Hashicorp! This tool looks awesome. I wish it had been around years ago so I might have a nice version-controlled set of configuration files instead of a bunch of wiki articles and post-it notes ;)
I have a quick question I didn't see covered in the docs. Is there a best practise way to organise Terraform configuration files? Specifically when using it to manage different environments (e.g. staging, prod, qa). I'm thinking of some sort of folder structure like this:
/
production/
web.tf
staging/
web.tf
qa/
web.tf
test-servers.tf
So, `terraform apply production` would then plan and apply changes for production servers, `terraform apply staging` the same for staging, etc.
Would be interested to know if you have any thoughts on this, or if there's some sort of paradigm you folks are using internally.
- mitchellh 12y agoWe should've included a roadmap, but Terraform 0.2 will introduce first-class modules and a [basic] package manager. We'll also address environments then.
- otterley 12y agoCan we please have a non-sucky package manager so I can finally tell developers to do the right thing instead of begging me for Docker?
- icebraining 12y agodebs built with fpm[1] have been working for me. Unless you need something particularly complex, it should just be a matter of setting up a directory with the right layout and calling fpm with a couple of parameters. [1] https://github.com/jordansissel/fpm https://github.com/jordansissel/fpm
- ecnahc515 12y agoI'm pretty sure by package manager, he means to install Terraform modules. Docker still fits for your problem, so does Packer. Honestly, it's super nice to not have to worry about any external resources failing, where you only have 1 thing pulled in to deploy any type of application, and that would be the image.
- otterley 12y agoThe same is also true of packages, if you're packaging correctly and work in a sane environment. It's also a lot easier for devops to manage, because they then only have to apply access control, logging, resource management, and other integration requirements to the main OS image, instead of to every Docker image produced for deployment.
- lobster_johnson 12y agoWhat granularity do you see Terraform acting at? Could it replace Puppet, say? I would love to keep the complete codebase for our infrastructure's config in a single place, in a single language; I can see Terraform driving Puppet with variables, but there's an overlap here (declarativeness and modularity) that would benefit from being seamless. Then again, with something like Docker you hardly need Puppet, and could simplify the recipes to the point where Terraform injected vars into a dockerfile before deploy.