Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add terragrunt-actions/setup-terragrunt Action #32

Open
yordis opened this issue Nov 4, 2023 · 3 comments
Open

Add terragrunt-actions/setup-terragrunt Action #32

yordis opened this issue Nov 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@yordis
Copy link

yordis commented Nov 4, 2023

Describe the solution you'd like

I would like to have an Action that setup the tools in the given context, without doing magical things like tg_command

name: 'Terragrunt GitHub Actions'
on:
  - pull_request

env:
  tf_version: '1.4.6'
  tg_version: '0.46.3'
  working_dir: 'project'

jobs:
  terraform:
    runs-on: ubuntu-latest
    needs: [ checks ]
    steps:
      - name: 'Checkout'
        uses: actions/checkout@main

      - name: Setup Terragrunt
        uses: gruntwork-io/terragrunt-action@v1
        with:
          tf_version: ${{ env.tf_version }}
          tg_version: ${{ env.tg_version }}
      # .........

Describe alternatives you've considered

Use the main action that hides away the hosts environment behind the Action, forcing the steps to be owned by the action when it comes to anything related to terragrunt, but more often than not, people build around a step.

I seen this done before and end up being an anti-pattern, or requiring hacky things of passing things like SSH keys and Github Tokens to the container rather than leveraging the hosts, at least as I could expect. Or adding things like tg_dir that mimics working-directory flag, among many other configurations that dont need to be pass in and are configured at the job level. Also (maybe) speed since the action is always dealing with checking downloads and whatnot instead of just one time during the setup-* action.

Additional context

Most setup-* action exists that only inject the binaries to avoid the problems listed before.

Among many other things it will ask to keep adding and opening the action to add more complexity to it :2cents:

@yordis yordis added the enhancement New feature or request label Nov 4, 2023
@yordis
Copy link
Author

yordis commented Nov 5, 2024

Hey @denis256 I would love to migrate from autero1/action-terragrunt (just to use the official things) Is there any opportunity to get the setup-terragrunt action?

@denis256
Copy link
Member

denis256 commented Nov 20, 2024

Hi,
I’d recommend exploring mise as an alternative for installing the required tools. It’s a versatile solution that simplifies the setup process and ensures that the necessary dependencies are installed efficiently, mise is already included in the action image.
With mise, you can define your required tools and their versions in a mise.yml file, ensuring consistency and ease of configuration across your projects.

https://mise.jdx.dev/

It can also be used mise action to install required software https://github.com/jdx/mise-action

@yordis
Copy link
Author

yordis commented Nov 20, 2024

Would be too much to ask to include gruntwork-io/terragrunt-action/setuo-terragrunt as part of the repo? I can do the work.

Since you are already familiar with the tooling, which is almost the same, just remove the extra indirection.

Please understand that dealing with compliance is more complicated than necessary. Because of the paid packages we used, Gruntwork already passed the check, so your owning the situation makes it more straightforward to continue introducing more Gruntwork tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants