Git Product home page Git Product logo

Comments (5)

angeloskaltsikis avatar angeloskaltsikis commented on August 16, 2024 1

Hello friends,
Good to see the community around this project growing and more people contributing. 🎉
I was thinking of about the same requirement but without having to declare an extra local variable.
With a very quick look in case we add this https://github.com/gruntwork-io/terragrunt/blob/e6deff2a02cfee5c4f908157624d4b882f128bfd/config/config_partial.go#L71 to https://github.com/transcend-io/terragrunt-atlantis-config/blob/master/cmd/generate.go#L112 we may be able to have access to the the terraform_version_constraint field that may be defined in a file.
I was thinking of doing it that way.
In case this field is defined in the root terragrunt file we can set it to all the projects under the root unless a terragrunt leaf file has this variable terraform_version_constraint defined inside it.

WDYT @dmattia @mmclane ?
In case you like that i will be happy to contribute it.

from terragrunt-atlantis-config.

dmattia avatar dmattia commented on August 16, 2024

This sounds great. I'm thinking:

  • A flag named --terraform-version that sets the default across all projects
  • a local named atlantis_terraform_version that can override that default on a per project basis

If that sounds good, I can code it up

from terragrunt-atlantis-config.

mmclane avatar mmclane commented on August 16, 2024

The default vault version is defined at the Atlantis server already. I can see someone wanting to set a specific terraform version at the root and having that flow down the tree. That isn't how I would be using it, at least not at this time but I can see that as being reasonable. For my use case I want everything to use a specific version of tf but we occasionally have a project that gets built with the wrong version. So, instead of going through the pain of downgrading the state file I want to be able to specify a newer version for just that project. Being able to through that version into the terragrunt.hcl file seems easy.

At the end of the day I am not currently planning on using this tool. I instead wrote a python script to do most of the work this was, but it allowed me to quickly add a few features that I thought we needed but were missing from your tool (this included). But I think this utility is definitely needed and should possibly be integrated with the main atlantis tool.

from terragrunt-atlantis-config.

angeloskaltsikis avatar angeloskaltsikis commented on August 16, 2024

Unfortunately i came across some issues with the idea i proposed above as with constraints that currently exist in Terragrunt you can get the minimum/maximum version that something can run which is not sufficient for what we need.
Any other ideas for the implementation are appreciated.
I haven't pushed my code yet as it is not even close to be considered usable.
cc. @dmattia

from terragrunt-atlantis-config.

dmattia avatar dmattia commented on August 16, 2024

There's always running the code equivalent of terragrunt state pull | jq ".terraform_version", but I don't love the idea of relying on the state having a specific format because there aren't any guarantees over its structure that I can tell.

This is more of a general community question, but how often do people change their terraform versions between modules?

If it's not terribly often, I don't think the locals approach is a bad idea.

from terragrunt-atlantis-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.