You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if you have a module hierarchy say a root module which calls a library module which calls an internal module, the input and output descriptions are somewhat tedious to manage : if you add a variable or output in leaf module, or if you update description or delete the input or output in one place, you have to remember to make same edit in the other places in hierarchy. Error prone.
It would be nice to have a way to "propagate" the description or even the entire input or output higher up the hierarchy of modules. Eg consider
output "abc" {
value = "module.something.abc"
description = "copy of abc description"
}
If you omitted the description, tf could just assume it is the same. How often would you not want that? For the rare cases when you don't, you still have the ability to specify it, so nothing is lost.
Even better, enable export declaration (in parent modules):
export output "module.something.abc" {}
would do the right thing. Same with export variable. If you want to override the description you could do so inside the export block.
It might be nice too (may need more discussion) that if the output or variable referenced no longer exists, tf would print a warning but it would otherwise ignore it / remove it from the outputs or variables. This would accelerate development and allow you to cleanup input and output declarations at the end.
The text was updated successfully, but these errors were encountered:
schollii
changed the title
Enable to declare Outputs for export
Auto propagate output and variables
Jun 8, 2021
Currently if you have a module hierarchy say a root module which calls a library module which calls an internal module, the input and output descriptions are somewhat tedious to manage : if you add a variable or output in leaf module, or if you update description or delete the input or output in one place, you have to remember to make same edit in the other places in hierarchy. Error prone.
It would be nice to have a way to "propagate" the description or even the entire input or output higher up the hierarchy of modules. Eg consider
If you omitted the description, tf could just assume it is the same. How often would you not want that? For the rare cases when you don't, you still have the ability to specify it, so nothing is lost.
Even better, enable export declaration (in parent modules):
would do the right thing. Same with
export variable
. If you want to override the description you could do so inside the export block.It might be nice too (may need more discussion) that if the output or variable referenced no longer exists, tf would print a warning but it would otherwise ignore it / remove it from the outputs or variables. This would accelerate development and allow you to cleanup input and output declarations at the end.
The text was updated successfully, but these errors were encountered: