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

missing vars from included file #365

Closed
tomdavidson opened this issue Nov 11, 2017 · 3 comments · Fixed by #374
Closed

missing vars from included file #365

tomdavidson opened this issue Nov 11, 2017 · 3 comments · Fixed by #374
Labels

Comments

@tomdavidson
Copy link
Contributor

My live plan is not including variables from the included terraform.tfvars file. Do I misunderstand how the include it is suppose to work?

root/
--pq/terraform.tfvars
--terraform.tfvars

In the pq file is have:

terragrunt = {
  include {
    path = "${find_in_parent_folders()}"
  }

  terraform {
    source = "../tf_modules/k8s/pq"
  }
}

and in the root file I have

terragrunt = {
  remote_state {
  ...
 }
}

names = {
  "prefix" = "devops-k8s"
}

dns = {
  "base_zone" = "k8s.domain.com"
}

If I add the names and dns maps to the pq file then all is is well (except it is wet).

@tomdavidson tomdavidson changed the title vars from include missing vars from included file Nov 11, 2017
@brikis98
Copy link
Member

brikis98 commented Nov 11, 2017

include currently only includes the terragrunt = { ... } configuration. Including variables from the parent .tfvars file is an interesting idea worth thinking through. See #132 for related discussion.

@tomdavidson
Copy link
Contributor Author

@brikis98 thanks a ton for helping me get started with terragrunt.
I thought #132 was about interpolation but I'm starting to understand the "tg theory" better and am happy to do a pr on the readme to help this be more explicit for the next new user - unless it is just me :)

@brikis98
Copy link
Member

Yes, #132 is about interpolation, but underneath, it's the same general question: how to re-use variables across various .tfvars files.

PR to clarify this in the README is very welcome.

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

Successfully merging a pull request may close this issue.

2 participants