4 ms·
> terraform-lsp is supposed to provide autocomplete, but it mostly doesn’t, in my experience. I find Terraform for Jetbrains IDEs to work hundred times better
by pqb 6y ago
> terraform-lsp is supposed to provide autocomplete, but it mostly doesn’t, in my experience.
I find Terraform for Jetbrains IDEs to work hundred times better than the VSCode one. I really can recommend it, does magic to autocompletion, peek definition, snippets insertion and linting TF/HCL files.
Author of this blogpost have not mentioned Terragrunt [0], while I think it is worth mentioning. It is nice tool, especially if you work on bigger projects having multiple modules and per-environment variables.
Also, a tip from a person, who works in team using terraform - use brew/apt repositories to keep the binaries up-to-date or at least on the same version as your team mates. I remember at least few situations, when patch update of a terraform binary was crucial to make some issues disappear.
[0]: https://terragrunt.gruntwork.io/ https://terragrunt.gruntwork.io/
Psst... I am also using Terraform to bootstrap Pop_OS! with my dotfiles and it is surprisingly nice enough to mimic declarative and atomic NixOS configuration :)
- ciceryadam 6y agoFor distributed work on environments you ideally you want to have something like a gitlab pipeline that does the tf plan for you automatically, with a manual approve button of sorts. That way you a consistent tf version defined in .gitlab-ci.yml, plus due to centralized logging it's easier to find when and what changed in the envs.
- pqb 6y agoI assume you are talking about a similar tool to the Atlantis [0] / Terraform SaaS offering [1]. [0]: https://www.runatlantis.io/ https://www.runatlantis.io/ [1}: https://www.hashicorp.com/blog/terraform-collaboration-for-everyone https://www.hashicorp.com/blog/terraform-collaboration-for-e...
- ciceryadam 6y agoYeah, exactly the same functionality, but just implemented with a different toolset: https://docs.gitlab.com/ee/user/infrastructure/ https://docs.gitlab.com/ee/user/infrastructure/
- vbsteven 6y agoI implemented this on top of bitbucket pipelines with a 'manual' pipeline step. The pipeline runs the plan step automatically and outputs it on the console. Then pipelines shows a button next to it called 'deploy' which is only clicked after manually verifying the plan results.
- joobus 6y agoBut he did mention Terragrunt: > Terraform: Up & Running is excellent, and Terragrunt makes it even easier. Huge thanks to their team for providing the duct tape we need.
- pqb 6y agoOuch, what a shame on my side. Sorry, I must have missed it. Thanks for pointing it out.
- leetrout 6y agoasdf has a terraform plugin and solves the problem of folks being on the wrong versions quite nicely. https://asdf-vm.com/#/ https://asdf-vm.com/#/
- cies 6y ago> or at least on the same version as your team mates. I remember at least few situations, when patch update of a terraform binary was crucial to make some issues disappear. I find it a little evil that Terraform is used so widely in production yet still hangs on to the "0.x.y" semantic version meaning: we break API when ever we want. It should be more stable for a tool so widely used. C'mon Hashicorp, be fair to us and release a 1.0!
- dastx 6y ago> Also, a tip from a person, who works in team using terraform - use brew/apt repositories to keep the binaries up-to-date or at least on the same version as your team mates. Use tfenv instead. That way you can have a .terraform_version file in your repo and tfenv will refuse to run without having the right version.