From 4ebaf339836536014d2306157b8240c7bbef9a71 Mon Sep 17 00:00:00 2001 From: Elbaz Date: Wed, 23 Aug 2023 13:00:23 +0300 Subject: [PATCH] alters --- internal/legacy/helper/schema/provider.go | 2 +- .../legacy/terraform/resource_provider.go | 8 +++---- internal/legacy/terraform/state.go | 24 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/internal/legacy/helper/schema/provider.go b/internal/legacy/helper/schema/provider.go index e7802852fd..08c2be0963 100644 --- a/internal/legacy/helper/schema/provider.go +++ b/internal/legacy/helper/schema/provider.go @@ -412,7 +412,7 @@ func (p *Provider) ImportState( return nil, fmt.Errorf( "nil entry in ImportState results. This is always a bug with\n" + "the resource that is being imported. Please report this as\n" + - "a bug to Terraform.") + "a bug to OpenTF.") } } diff --git a/internal/legacy/terraform/resource_provider.go b/internal/legacy/terraform/resource_provider.go index 8f035250bc..9f4e6f44a4 100644 --- a/internal/legacy/terraform/resource_provider.go +++ b/internal/legacy/terraform/resource_provider.go @@ -225,15 +225,15 @@ func ProviderHasDataSource(p ResourceProvider, n string) bool { } const errPluginInit = ` -Plugin reinitialization required. Please run "terraform init". +Plugin reinitialization required. Please run "opentf init". -Plugins are external binaries that Terraform uses to access and manipulate +Plugins are external binaries that OpenTF uses to access and manipulate resources. The configuration provided requires plugins which can't be located, don't satisfy the version constraints, or are otherwise incompatible. -Terraform automatically discovers provider requirements from your +OpenTF automatically discovers provider requirements from your configuration, including providers used in child modules. To see the -requirements and constraints, run "terraform providers". +requirements and constraints, run "opentf providers". %s ` diff --git a/internal/legacy/terraform/state.go b/internal/legacy/terraform/state.go index 4440619bd0..fe931d66ea 100644 --- a/internal/legacy/terraform/state.go +++ b/internal/legacy/terraform/state.go @@ -1922,10 +1922,10 @@ func testForV0State(buf *bufio.Reader) error { return fmt.Errorf("Failed to check for magic bytes: %v", err) } if string(start) == "tfstate" { - return fmt.Errorf("Terraform 0.7 no longer supports upgrading the binary state\n" + - "format which was used prior to Terraform 0.3. Please upgrade\n" + - "this state file using Terraform 0.6.16 prior to using it with\n" + - "Terraform 0.7.") + return fmt.Errorf("OpenTF 0.7 no longer supports upgrading the binary state\n" + + "format which was used prior to OpenTF 0.3. Please upgrade\n" + + "this state file using OpenTF 0.6.16 prior to using it with\n" + + "OpenTF 0.7.") } return nil @@ -2011,7 +2011,7 @@ func ReadState(src io.Reader) (*State, error) { result = v3State default: - return nil, fmt.Errorf("Terraform %s does not support state version %d, please update.", + return nil, fmt.Errorf("OpenTF %s does not support state version %d, please update.", tfversion.SemVer.String(), versionIdentifier.Version) } @@ -2055,7 +2055,7 @@ func ReadStateV2(jsonBytes []byte) (*State, error) { // Check the version, this to ensure we don't read a future // version that we don't understand if state.Version > StateVersion { - return nil, fmt.Errorf("Terraform %s does not support state version %d, please update.", + return nil, fmt.Errorf("OpenTF %s does not support state version %d, please update.", tfversion.SemVer.String(), state.Version) } @@ -2064,9 +2064,9 @@ func ReadStateV2(jsonBytes []byte) (*State, error) { if _, err := version.NewVersion(state.TFVersion); err != nil { return nil, fmt.Errorf( "State contains invalid version: %s\n\n"+ - "Terraform validates the version format prior to writing it. This\n"+ + "OpenTF validates the version format prior to writing it. This\n"+ "means that this is invalid of the state becoming corrupted through\n"+ - "some external means. Please manually modify the Terraform version\n"+ + "some external means. Please manually modify the OpenTF version\n"+ "field to be a proper semantic version.", state.TFVersion) } @@ -2090,7 +2090,7 @@ func ReadStateV3(jsonBytes []byte) (*State, error) { // Check the version, this to ensure we don't read a future // version that we don't understand if state.Version > StateVersion { - return nil, fmt.Errorf("Terraform %s does not support state version %d, please update.", + return nil, fmt.Errorf("OpenTF %s does not support state version %d, please update.", tfversion.SemVer.String(), state.Version) } @@ -2099,9 +2099,9 @@ func ReadStateV3(jsonBytes []byte) (*State, error) { if _, err := version.NewVersion(state.TFVersion); err != nil { return nil, fmt.Errorf( "State contains invalid version: %s\n\n"+ - "Terraform validates the version format prior to writing it. This\n"+ + "OpenTF validates the version format prior to writing it. This\n"+ "means that this is invalid of the state becoming corrupted through\n"+ - "some external means. Please manually modify the Terraform version\n"+ + "some external means. Please manually modify the OpenTF version\n"+ "field to be a proper semantic version.", state.TFVersion) } @@ -2153,7 +2153,7 @@ func WriteState(d *State, dst io.Writer) error { if _, err := version.NewVersion(d.TFVersion); err != nil { return fmt.Errorf( "Error writing state, invalid version: %s\n\n"+ - "The Terraform version when writing the state must be a semantic\n"+ + "The OpenTF version when writing the state must be a semantic\n"+ "version.", d.TFVersion) }