Added unit tests and moved the finding function to a new class because it felt wrong making ModuleDetectionUtil.getTerraformDirSomewhere() more visible just to test it.
Changed to use ProjectFileIndex.isInContent() instead of VfsUtilCore.isAncestor(project.baseDir, ...) because the later was causing trouble due to the dir structure of some of my TF projects.
Added unit tests and moved the finding function to a new class because it felt wrong making
ModuleDetectionUtil.getTerraformDirSomewhere()
more visible just to test it.Changed to use
ProjectFileIndex.isInContent()
instead ofVfsUtilCore.isAncestor(project.baseDir, ...)
because the later was causing trouble due to the dir structure of some of my TF projects.Added caching to the finding function.