• Manage multiple Terraform versions with tfenv

    3 min read

    terraform tfenv multiple versions switch version

    As terraform evolves has been major changes that forces you to update your terraform code to use it with the latest version. If you have a large codebase it can be very challenging to keep up with the versions since it can be very time consuming. So, instead of this you can specify on your side the required terraform version like so:

    terraform {
      required_version = "=0.11.14"
    }
    

    If you try to plan/apply this code you would get an error message like this:

    Error: Unsupported Terraform Core version
    
      on main.tf line 3, in terraform:
       3:   required_version = "0.11.14"
    
    This configuration does not support Terraform version 0.13.5. To proceed,
    either choose another supported Terraform version or update this version
    constraint. Version constraints are normally set for good reason, so updating
    the constraint may lead to other errors or unexpected behavior.
    

    To make it easier to switch between terraform versions we can use tfenv

    01/02/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets