Detail:"This module is not yet installed. Run \"terraform init\" to install all modules required by this configuration.",
Subject:&req.CallRange,
},
}
}
vardiagshcl.Diagnostics
// Check for inconsistencies between manifest and config
ifreq.SourceAddr!=record.SourceAddr{
diags=append(diags,&hcl.Diagnostic{
Severity:hcl.DiagError,
Summary:"Module source has changed",
Detail:"The source address was changed since this module was installed. Run \"terraform init\" to install all modules required by this configuration.",
Summary:"Module version requirements have changed",
Detail:"The version requirements have changed since this module was installed and the installed version is no longer acceptable. Run \"terraform init\" to install all modules required by this configuration.",
Summary:"Module version requirements have changed",
Detail:fmt.Sprintf(
"The version requirements have changed since this module was installed and the installed version (%s) is no longer acceptable. Run \"terraform init\" to install all modules required by this configuration.",
record.Version,
),
Subject:&req.SourceAddrRange,
})
}
mod,mDiags:=l.parser.LoadConfigDir(record.Dir)
diags=append(diags,mDiags...)
ifmod==nil{
// nil specifically indicates that the directory does not exist or
// cannot be read, so in this case we'll discard any generic diagnostics
// returned from LoadConfigDir and produce our own context-sensitive
// error message.
returnnil,nil,hcl.Diagnostics{
{
Severity:hcl.DiagError,
Summary:"Module not installed",
Detail:fmt.Sprintf("This module's local cache directory %s could not be read. Run \"terraform init\" to install all modules required by this configuration.",record.Dir),