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

Auto propagate output and variables #28893

Open
schollii opened this issue Jun 8, 2021 · 0 comments
Open

Auto propagate output and variables #28893

schollii opened this issue Jun 8, 2021 · 0 comments
Labels
enhancement new new issue not yet triaged

Comments

@schollii
Copy link

schollii commented 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

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.

@schollii schollii changed the title Enable to declare Outputs for export Auto propagate output and variables Jun 8, 2021
@jbardin jbardin added enhancement new new issue not yet triaged labels Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants