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 support for terragrunt #36

Closed
gercograndia opened this issue Jan 29, 2024 · 14 comments
Closed

Add support for terragrunt #36

gercograndia opened this issue Jan 29, 2024 · 14 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gercograndia
Copy link

Is your feature request related to a problem? Please describe.

No direct problem.

Describe the solution you'd like

It would be cool if we could use this for managing the terragrunt version as well. We're now using tfenv and tgswitch respectively, both behaving in a slightly different way. Harmonizing this would be great.

@kvendingoldo
Copy link
Collaborator

@dvaumoron how do you think, will it be difficult?

@kvendingoldo
Copy link
Collaborator

kvendingoldo commented Jan 29, 2024

@gercograndia Thanks for issue! I think that we'll try to add Terragrunt support in the near future. Do you have any requirement that we need to keep in mind?

@kvendingoldo kvendingoldo added enhancement New feature or request help wanted Extra attention is needed labels Jan 29, 2024
@gercograndia
Copy link
Author

Great!!

From a requirements perspective:

  • obsiously you need to be able to set the terragrunt version
  • it would be great if it tenv could traverse upwards until it finds the right config that specifies the terragrunt file (something that tgswitch doesn't do ATM, but tfenv does).

In general it should behave exactly the same as for terraform and opentofu.

@dvaumoron
Copy link
Contributor

Probably not very difficult with the current design, i will take a look

@dvaumoron
Copy link
Contributor

The harder part will be changing the version detection part (not same kind of behaviour as OpenTofu/Terraform handling), however the last refactoring done have made that easier.

There will also be a difference on the download part, as terragrunt asset are directly binaries, not zip archive.

@dvaumoron
Copy link
Contributor

There will also be subtleties to support tgswitch.toml file, .tgswitchrc file and .terragrunt-version file at the same time.

@dvaumoron dvaumoron self-assigned this Jan 29, 2024
@gercograndia
Copy link
Author

For me the .terragrunt-version would be sufficient. But hey, this is just how we are using it of course.

But also here I would not necessarily aim for feature-partity, but keep the way of working the same as for the rest of tenv.

@dvaumoron
Copy link
Contributor

Done (not tested yet)

@kvendingoldo
Copy link
Collaborator

@dvaumoron wow! that was so quick!

@gercograndia
Copy link
Author

And quick it was, damn! 😁

dvaumoron added a commit that referenced this issue Jan 30, 2024
@dvaumoron
Copy link
Contributor

Seem to work as expected now, i will update doc

dvaumoron added a commit that referenced this issue Jan 30, 2024
@dvaumoron
Copy link
Contributor

flat files like .opentofu-version or .terragrunt-version and other files like .tgswitch.toml or terragrunt.hcl are not handled in a consistent way. That need a rework.

@kvendingoldo
Copy link
Collaborator

@dvaumoron I think that we can move this part of work to another issue.

@kvendingoldo
Copy link
Collaborator

@dvaumoron great job!

dvaumoron added a commit that referenced this issue Feb 23, 2024
dvaumoron added a commit that referenced this issue Feb 23, 2024
dvaumoron added a commit that referenced this issue Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants