GithubHelp home page GithubHelp logo

Comments (3)

RDhar avatar RDhar commented on July 25, 2024

Hey @danielmapar, I'm a fan of this feature request! And you've raised it at the perfect time, just ahead of the upcoming v11 major version release. There're a few points of interest worth mentioning:

  • The biggest one: this Action is moving away from comments-trigger (i.e., issue_comment) since GitHub's support for this trigger is extremely limited. It doesn't even support basic filters like paths or branches, and nor is there any native protection for escaping/passing any ol' Bash input command directly.
    • Instead, efforts will be focused on pull_request trigger, which is supported (and used) far more extensively.
    • As a compromise to meet the needs of interactive trigger, pull_request also supports labeled activity type, which can be leveraged to manually trigger commands based on the PR label used.
  • In a spot of good news: there's going to be built-in support for tenv, which is the most popular open-source version manager for TF binaries, including: OpenTofu, Terraform, and Terragrunt.
    • Although Terragrunt will be included, I'd need to include support for each of its commands' arguments just like with Terraform plan, for example. Would you mind sharing a similar list for Terragrunt where the CLI options are documented?

from tf-via-pr.

danielmapar avatar danielmapar commented on July 25, 2024

@RDhar that sounds great! Thanks for the updates, excited to see the new release.

I would say the top 1 command one needs to support for Terragrunt is: terragrunt run-all plan/apply/destroy. Terragrunt itself implements all base Terraform commands as well, more here.

run-all pretty much runs plan/apply/destroy/etc in multiple folders that contain a terragrunt.hcl file. That may lead to an insanely big output (just a heads up). Another important thing to point out is that having the power to supply CLI flags would be extremely important for Terragrunt. One example would be running terragrunt run-all plan --terragrunt-working-dir ~/XYZ.

I am not sure if that will impact your implementation, but it is also worth noting that Terragrunt creates multiple tfstate files (one per folder containing a terragrunt.hcl file). It also creates s3 buckets and even dynamodb tables automatically. That means you may have multiple tfstates inside the same s3 bucket for example. More info on that here.

Once again, fantastic project. Keep me posted if you have any further questions.

from tf-via-pr.

danielmapar avatar danielmapar commented on July 25, 2024

One fantastic project to use as a benchmark to validate your github action is the terragrunt-infrastructure-live-example. It is a sample project implementing all best practices for Terragrunt and contains the general anatomy of a Terragrunt project. This live example is supported by Gruntworks (aka the creators of Terragrunt).

Not sure if it helps, but Terragrunt also has its own github action terragrunt-action. That may give you some insights on how it works.

from tf-via-pr.

Related Issues (12)

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.