Open lukaspour opened 6 years ago
Make sure that you are using Terragrunt to run hook which will copy ./common/main_variables.tf
AND lock version of the module.
Well the only thing I do is terragrunt plan
at directory where I have terragrunt.tfvars
file with source
pointing to local RDS
module:
terragrunt = {
terraform {
source = "${path_relative_from_include()}/../../..//modules/neo-rds"
}
...
neo-rds
module is doing nothing interesting so far, if I am going to get around this issue, I'll add there the remote state for ecs
security group. neo-rds
itself have reference in module
to rds-instance-full
.
Any advice is very appreciated, I guess I just missed something, that's why I struggle. Thanks!
Could you show the code in git? Paste URL here.
Here is the branch https://github.com/TeliaSoneraNorge/devops/tree/rds_custom_sg, also WIP PR https://github.com/TeliaSoneraNorge/devops/pull/395
@mikael-lindstrom do you maybe have any idea how to go around this issue?
This seems to be related with terragrunt. I'm assuming that it has something to do with the hook that is supposed to copy some stuff automatically not working correctly.
These modules should be rewritten to be pure terraform so you can use them without terragrunt but for now I recommend double-checking the terragrunt hooks.
I've tried to pass the variables explicitly with no luck. What if I rewrite the module to terraform instead? It just seems to me faster than exploring not working hooks.
Hi, I have an issue with variables which are used in
rds-instance-full
in case where I use them in a simplemodule
:These are the errors:
And it seems pretty reasonable since none of those variables are defined in
variables.ft
of the module. When I userds-instance-full
directly interraform.tfvars
I have no problem.I would change the
rds
module not use those variables or I would have to edit the module instead, which we said is not a good idea. Is there any other way how to pass the variables from one module to another? Thanks