Need a way to share variable definitions between configurations

Terraform absolutely needs a way to share common definitions. I see nothing wrong with the idea of sharing variable definitions…especially when they have default values. It would make good sense also to share locals and data sources. I’ve written a preprocessor that runs in front of the TF binary that copies files into my cwd to get around the lack of this simple features. The TF folks NEED to add this. The two ways I can see to do this are either a #include-like mechanism, like in C/C++, or the ability to define additional directories from which to read .tf files.

1 Like