fix(misconf): properly resolve local Terraform cache (#7983)

Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
This commit is contained in:
Nikita Pivkin
2024-11-26 04:18:39 +06:00
committed by GitHub
parent 44c7fdd7a3
commit fe3a8971b6
3 changed files with 62 additions and 17 deletions

View File

@@ -90,9 +90,9 @@ func (e *evaluator) loadModuleFromTerraformCache(ctx context.Context, b *terrafo
var modulePath string
if e.moduleMetadata != nil {
// if we have module metadata we can parse all the modules as they'll be cached locally!
name := b.ModuleName()
moduleKey := b.ModuleKey()
for _, module := range e.moduleMetadata.Modules {
if module.Key == name {
if module.Key == moduleKey {
modulePath = path.Clean(path.Join(e.projectRootPath, module.Dir))
break
}