mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Change link for missing module or missing provider (#1724)
Signed-off-by: RLRabinowitz <rlrabinowitz2@gmail.com>
This commit is contained in:
parent
e67cbc448c
commit
5667df4969
@ -432,7 +432,7 @@ func TestInitProviderNotFound(t *testing.T) {
|
||||
}
|
||||
|
||||
oneLineStdout := strings.ReplaceAll(stdout, "\n", " ")
|
||||
if !strings.Contains(oneLineStdout, `"diagnostic":{"severity":"error","summary":"Failed to query available provider packages","detail":"Could not retrieve the list of available versions for provider hashicorp/nonexist: provider registry registry.opentofu.org does not have a provider named registry.opentofu.org/hashicorp/nonexist\n\nAll modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/nonexist, run the following command:\n tofu providers\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/"},"type":"diagnostic"}`) {
|
||||
if !strings.Contains(oneLineStdout, `"diagnostic":{"severity":"error","summary":"Failed to query available provider packages","detail":"Could not retrieve the list of available versions for provider hashicorp/nonexist: provider registry registry.opentofu.org does not have a provider named registry.opentofu.org/hashicorp/nonexist\n\nAll modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/nonexist, run the following command:\n tofu providers\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/new/choose"},"type":"diagnostic"}`) {
|
||||
t.Errorf("expected error message is missing from output:\n%s", stdout)
|
||||
}
|
||||
})
|
||||
@ -493,7 +493,8 @@ func TestInitProviderNotFound(t *testing.T) {
|
||||
│ tofu providers
|
||||
│
|
||||
│ If you believe this provider is missing from the registry, please submit a
|
||||
│ issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/
|
||||
│ issue on the OpenTofu Registry
|
||||
│ https://github.com/opentofu/registry/issues/new/choose
|
||||
╵
|
||||
|
||||
`
|
||||
|
@ -703,7 +703,7 @@ func (c *InitCommand) getProviders(ctx context.Context, config *configs.Config,
|
||||
}
|
||||
|
||||
if provider.Hostname == addrs.DefaultProviderRegistryHost {
|
||||
suggestion += "\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/"
|
||||
suggestion += "\n\nIf you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/new/choose"
|
||||
}
|
||||
|
||||
diags = diags.Append(tfdiags.Sourceless(
|
||||
|
@ -440,7 +440,7 @@ func (i *ModuleInstaller) installRegistryModule(ctx context.Context, req *config
|
||||
if registry.IsModuleNotFound(err) {
|
||||
suggestion := ""
|
||||
if hostname == addrs.DefaultModuleRegistryHost {
|
||||
suggestion = "\n\nIf you believe this module is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/"
|
||||
suggestion = "\n\nIf you believe this module is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/new/choose"
|
||||
}
|
||||
|
||||
diags = diags.Append(&hcl.Diagnostic{
|
||||
|
Loading…
Reference in New Issue
Block a user