diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go b/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go index 93a9420..0e6cba9 100644 --- a/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go +++ b/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go | |||
@@ -64,7 +64,15 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module, | |||
64 | Subject: &req.SourceAddrRange, | 64 | Subject: &req.SourceAddrRange, |
65 | }) | 65 | }) |
66 | } | 66 | } |
67 | if !req.VersionConstraint.Required.Check(record.Version) { | 67 | if len(req.VersionConstraint.Required) > 0 && record.Version == nil { |
68 | diags = append(diags, &hcl.Diagnostic{ | ||
69 | Severity: hcl.DiagError, | ||
70 | Summary: "Module version requirements have changed", | ||
71 | 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.", | ||
72 | Subject: &req.SourceAddrRange, | ||
73 | }) | ||
74 | } | ||
75 | if record.Version != nil && !req.VersionConstraint.Required.Check(record.Version) { | ||
68 | diags = append(diags, &hcl.Diagnostic{ | 76 | diags = append(diags, &hcl.Diagnostic{ |
69 | Severity: hcl.DiagError, | 77 | Severity: hcl.DiagError, |
70 | Summary: "Module version requirements have changed", | 78 | Summary: "Module version requirements have changed", |