#help (2023-07)
Where to get help about getting help!
2023-07-14
Hi Everyone (had to rejoin with a new account after I left my last job!).
I’m using cloudposse’s aws api gw v1 module which calls their labels/context module. The line is:
context = module.this.context
However, I’m struggling to translate this to terragrunt which is how our devops team lead prefers us to handle our deployments. Terragrunt doesn’t mesh with the child module call. Since the label module is used across cloudposse modules, i thought there might be a recommended or community supported approach for how to incorporate it.
I’m newer to terragrunt so any obvious configs are being missed. My only thought was to create another terragrunthcl that calls the label module (and fill out the required 12 variables in terragrunt syntax)… but then I don’t know how to correlate the api gw module call with the labels call. Happy to hear a better solution if you have one!
why do you need to care about terraform child modules that are embedded into top-level modules (it’s a terraform concern)? Each top-level module accepts the context variables namespace
, tenant
,
environment,
stage. And you provide values for those variables when you instantiate a top-level module, e.g.
tgw`
enabled = true
region = "us-east-2"
availability_zones = ["us-east-2a", "us-east-2b", "us-east-2c"]
namespace = "eg"
stage = "test"
name = "tgw"
Because terragrunt.hcl
:
inputs = {
context = module.this.context
openapi_config = jsondecode(file("dev-io.json"))
}
Throws an error in terragrunt since it can’t process what module.this.context
is even IF i pass it the variables as your example shows.
(btw, we do have a #terragrunt channel)
@Erik Osterman (Cloud Posse) It says it was archived ?
I joined I searched and it appeared as archived which left me to believe it was unused.
Oh to be clear, [archive.sweetops.com](http://archive.sweetops.com)
is everything and not just archived slack channels