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 support #51

Open
rafaljanicki opened this issue Nov 22, 2022 · 1 comment
Open

Add Terragrunt support #51

rafaljanicki opened this issue Nov 22, 2022 · 1 comment

Comments

@rafaljanicki
Copy link

Terragrunt is a widely adopted additional "layer" on top of Terraform to structure the code for different environments as well as it provides more functionality to keep Terraform clean.

In context of tfvc, Terragrunt allows for a few things:

  • direct specification of a Terraform module in a terrgrunt.hcl file via tfr:/// link
  • automated generation of required_providers and version constraints

For the support, I believe the first step would be to disable via a flag these two errors:
terraform FAILED Missing version constraints
provider 'aws' FAILED Missing provider definition

That'd allow TFVC show warnings for .tf files without failing hard. Next step would be to allow pointing to Terragrunt directories instead of Terraform directories although I'm aware that this'd be a much bigger chunk of code to add

@rafaljanicki
Copy link
Author

Alternatively, we could run terragrunt run-all plan before running tfvc which generates directories with version and providers as well as downloaded dependencies. That might be easier to tackle, but would require recursive mode discussed in #47 as directories generated by terragrunt have random-ish names. So a recursive mode which look for .tf files only in a given directory structure would definitely work

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

No branches or pull requests

1 participant