Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I need to jump between different versions of terraform, terragrunt, python, ... all the time for work. asdf is an absolute asset and makes that so much easier. I can heavily recommend giving it a try! I've even embedded it into our default CI image, as it allows me to very easily install consistent versions of many utilities, while also allowing to override versions by choice afterwards.



You might also want to check out hermit: https://cashapp.github.io/hermit/

Definitely not as many definitions as asdf, but what it does, it does well.


That homepage could use some work. I have no idea why I might choose that over asdf.



Sorry, but you misunderstand what asdf is! In Homebrew and Hermit and others, somebody needs to create a PR to add support for a new version - with asdf, it's not necessary and it's always ahead of Homebrew and other package managers, because it directly polls the releases of a project! So, you're not a the mercy of a packages repo maintainer! I've considered Hermit, but many of the tools I needed were severely outdated so I gave up on it!


Here's an example (just picked a random project) for tflint:

Hermit (v0.39.2):

  $ hermit info tflint
  Name: tflint
  Version: 0.39.2
  Description: A Pluggable Terraform Linter
  Homepage:
  State: remote
  Source: https://github.com/terraform-linters/tflint/releases/download/v0.39.2/tflint_darwin_amd64.zip
  Root: /Users/[REDACTED]/Library/Caches/hermit/pkg/tflint-0.39.2
Homebrew (v0.39.3):

  $ brew info tflint
  tflint: stable 0.39.3 (bottled), HEAD
  Linter for Terraform files
  https://github.com/terraform-linters/tflint
  /usr/local/Cellar/tflint/0.39.3 (6 files, 23.0MB) *
  Poured from bottle on 2022-08-12 at 08:54:53
  From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tflint.rb
  License: MPL-2.0
  ==> Dependencies
  Build: go 
  ==> Options
  --HEAD
   Install HEAD version
  ==> Analytics
  install: 10,687 (30 days), 25,133 (90 days), 70,271 (365 days)
  install-on-request: 10,683 (30 days), 25,122 (90 days), 70,251 (365 days)
  build-error: 0 (30 days)
asdf (v0.39.3):

  $ asdf latest tflint
  0.39.3


For terraform and terragrunt, I have been using tfswitch and tgswitch respectively.

Also tfswitch has the ability to parse the required_version constraint in the terraform file and switch to the appropriate version based on that which I find quite handy.


I've been using it to swap between different versions of Postgres, too.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: