mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #110 from opentffoundation/update-internal/configs
This commit is contained in:
commit
93ccbd82f5
@ -2039,7 +2039,7 @@ func TestInit_checkRequiredVersionFirst(t *testing.T) {
|
||||
t.Fatalf("got exit status %d; want 1\nstderr:\n%s\n\nstdout:\n%s", code, ui.ErrorWriter.String(), ui.OutputWriter.String())
|
||||
}
|
||||
errStr := ui.ErrorWriter.String()
|
||||
if !strings.Contains(errStr, `Unsupported Terraform Core version`) {
|
||||
if !strings.Contains(errStr, `Unsupported OpenTF Core version`) {
|
||||
t.Fatalf("output should point to unmet version constraint, but is:\n\n%s", errStr)
|
||||
}
|
||||
})
|
||||
@ -2063,7 +2063,7 @@ func TestInit_checkRequiredVersionFirst(t *testing.T) {
|
||||
t.Fatalf("got exit status %d; want 1\nstderr:\n%s\n\nstdout:\n%s", code, ui.ErrorWriter.String(), ui.OutputWriter.String())
|
||||
}
|
||||
errStr := ui.ErrorWriter.String()
|
||||
if !strings.Contains(errStr, `Unsupported Terraform Core version`) {
|
||||
if !strings.Contains(errStr, `Unsupported OpenTF Core version`) {
|
||||
t.Fatalf("output should point to unmet version constraint, but is:\n\n%s", errStr)
|
||||
}
|
||||
})
|
||||
|
@ -65,7 +65,7 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module,
|
||||
{
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Module not installed",
|
||||
Detail: "This module is not yet installed. Run \"terraform init\" to install all modules required by this configuration.",
|
||||
Detail: "This module is not yet installed. Run \"opentf init\" to install all modules required by this configuration.",
|
||||
Subject: &req.CallRange,
|
||||
},
|
||||
}
|
||||
@ -81,7 +81,7 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module,
|
||||
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.",
|
||||
Detail: "The source address was changed since this module was installed. Run \"opentf init\" to install all modules required by this configuration.",
|
||||
Subject: &req.SourceAddrRange,
|
||||
})
|
||||
}
|
||||
@ -89,7 +89,7 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module,
|
||||
diags = append(diags, &hcl.Diagnostic{
|
||||
Severity: hcl.DiagError,
|
||||
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.",
|
||||
Detail: "The version requirements have changed since this module was installed and the installed version is no longer acceptable. Run \"opentf init\" to install all modules required by this configuration.",
|
||||
Subject: &req.SourceAddrRange,
|
||||
})
|
||||
}
|
||||
@ -98,7 +98,7 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module,
|
||||
Severity: hcl.DiagError,
|
||||
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.",
|
||||
"The version requirements have changed since this module was installed and the installed version (%s) is no longer acceptable. Run \"opentf init\" to install all modules required by this configuration.",
|
||||
record.Version,
|
||||
),
|
||||
Subject: &req.SourceAddrRange,
|
||||
@ -116,7 +116,7 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module,
|
||||
{
|
||||
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),
|
||||
Detail: fmt.Sprintf("This module's local cache directory %s could not be read. Run \"opentf init\" to install all modules required by this configuration.", record.Dir),
|
||||
Subject: &req.CallRange,
|
||||
},
|
||||
}
|
||||
|
@ -735,9 +735,9 @@ func (m *Module) CheckCoreVersionRequirements(path addrs.Module, sourceAddr addr
|
||||
case len(path) == 0:
|
||||
diags = diags.Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Unsupported Terraform Core version",
|
||||
Summary: "Unsupported OpenTF Core version",
|
||||
Detail: fmt.Sprintf(
|
||||
"This configuration does not support Terraform version %s. To proceed, either choose another supported Terraform version or update this version constraint. Version constraints are normally set for good reason, so updating the constraint may lead to other errors or unexpected behavior.",
|
||||
"This configuration does not support OpenTF version %s. To proceed, either choose another supported OpenTF version or update this version constraint. Version constraints are normally set for good reason, so updating the constraint may lead to other errors or unexpected behavior.",
|
||||
tfversion.String(),
|
||||
),
|
||||
Subject: constraint.DeclRange.Ptr(),
|
||||
@ -745,9 +745,9 @@ func (m *Module) CheckCoreVersionRequirements(path addrs.Module, sourceAddr addr
|
||||
default:
|
||||
diags = diags.Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Unsupported Terraform Core version",
|
||||
Summary: "Unsupported OpenTF Core version",
|
||||
Detail: fmt.Sprintf(
|
||||
"Module %s (from %s) does not support Terraform version %s. To proceed, either choose another supported Terraform version or update this version constraint. Version constraints are normally set for good reason, so updating the constraint may lead to other errors or unexpected behavior.",
|
||||
"Module %s (from %s) does not support OpenTF version %s. To proceed, either choose another supported OpenTF version or update this version constraint. Version constraints are normally set for good reason, so updating the constraint may lead to other errors or unexpected behavior.",
|
||||
path, sourceAddr, tfversion.String(),
|
||||
),
|
||||
Subject: constraint.DeclRange.Ptr(),
|
||||
|
Loading…
Reference in New Issue
Block a user