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

Ability to pre-generate terraform code with terragrunt before validation #114

Open
wyardley opened this issue Jun 14, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@wyardley
Copy link

wyardley commented Jun 14, 2024

Describe the solution you'd like
It would be nice to be able to pre-generate the terraform code from terragrunt and then validate the outputs, which I don't think is possible / supported here?

Describe alternatives you've considered
Just running the vanilla terraform_validate hook, however, if the code depends on generated things like data resources, validation will fail
If there's some easy way to do this already, let me know.

Additional context
Example failure in a "root" module that depends on a Terragrunt generated data resource

│ Error: Reference to undeclared resource
│ 
│   on main.tf line 11, in resource "google_alloydb_cluster" "this":
│   11:     network = data.terraform_remote_state.network.outputs.network_id
│ 
│ A data resource "terraform_remote_state" "network" has not been declared in
│ the root module.
@wyardley wyardley added the enhancement New feature or request label Jun 14, 2024
@wyardley wyardley changed the title Ability to Ability to pre-generate terraform code with terragrunt before validation Jun 14, 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
Projects
None yet
Development

No branches or pull requests

2 participants