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

Terragrunt support #82

Open
userbradley opened this issue Feb 15, 2023 · 0 comments
Open

Terragrunt support #82

userbradley opened this issue Feb 15, 2023 · 0 comments

Comments

@userbradley
Copy link

I know this is a long shot, but I was wondering if you had any plans to support a similar method you use for terraform - but for terragrunt.

Let me explain the issue here.

In terragrunt, we have the concept of Generators and we use it for Creating provider blocks

The issue here is that sure, we can run terragrunt init and then tfupdate terraform -r . but this updates the generated files, not the original.

An example file is below:

generate "provider" {
  if_exists = "overwrite"
  path = "provider.tf"
  contents =<<EOF
terraform {
  required_version = "1.3.7"
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 4.50.0"
    }
  }
}
EOF
}

Which after running terragrunt init we get something like the below

# Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa
terraform {
  required_version = "1.3.7"
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 4.50.0"
    }
  }
}

I think you can start to see where the problem comes from. In the terragrunt.hcl file, the terraform is passed in as data, opposed to something structured.

Let me know if this is not in the roadmap, or if this is something you need more of an explanation of!

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