Skip to content

Commit

Permalink
Move tfdiags/ to internal/tfdiags/
Browse files Browse the repository at this point in the history
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.

If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
  • Loading branch information
apparentlymart committed May 17, 2021
1 parent ec85fb1 commit 05caff2
Show file tree
Hide file tree
Showing 232 changed files with 213 additions and 213 deletions.
2 changes: 1 addition & 1 deletion addrs/module_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/gocty"

"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// ModuleInstance is an address for a particular module instance within the
Expand Down
2 changes: 1 addition & 1 deletion addrs/parse_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Reference describes a reference to an address with source location
Expand Down
2 changes: 1 addition & 1 deletion addrs/parse_ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/go-test/deep"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion addrs/parse_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/hashicorp/hcl/v2/hclsyntax"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Target describes a targeted address with source location information.
Expand Down
2 changes: 1 addition & 1 deletion addrs/parse_target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/go-test/deep"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

func TestParseTarget(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion addrs/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/hashicorp/hcl/v2"
svchost "github.com/hashicorp/terraform-svchost"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Provider encapsulates a single provider type. In the future this will be
Expand Down
2 changes: 1 addition & 1 deletion addrs/provider_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/zclconf/go-cty/cty"

"github.com/hashicorp/hcl/v2"
Expand Down
2 changes: 1 addition & 1 deletion command/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/hashicorp/terraform/command/views"
"github.com/hashicorp/terraform/internal/backend"
remoteBackend "github.com/hashicorp/terraform/internal/backend/remote"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/plans/planfile"
"github.com/hashicorp/terraform/tfdiags"
)

// ApplyCommand is a Command implementation that applies a Terraform
Expand Down
2 changes: 1 addition & 1 deletion command/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/command/views"
"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/plans"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/states"
"github.com/hashicorp/terraform/states/statemgr"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
tfversion "github.com/hashicorp/terraform/version"
)

Expand Down
2 changes: 1 addition & 1 deletion command/arguments/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package arguments
import (
"fmt"

"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/plans"
"github.com/hashicorp/terraform/tfdiags"
)

// Apply represents the command-line arguments for the apply command.
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/plans"
"github.com/hashicorp/terraform/tfdiags"
)

// DefaultParallelism is the limit Terraform places on total parallel
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/output.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package arguments

import (
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Output represents the command-line arguments for the output command.
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

func TestParseOutput_valid(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/plan.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package arguments

import (
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Plan represents the command-line arguments for the plan command.
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/refresh.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package arguments

import (
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Refresh represents the command-line arguments for the apply command.
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"flag"
"io/ioutil"

"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Test represents the command line arguments for the "terraform test" command.
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/apparentlymart/go-shquot/shquot"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

func TestParseTest(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/validate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package arguments

import (
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// Validate represents the command-line arguments for the validate command.
Expand Down
2 changes: 1 addition & 1 deletion command/arguments/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

func TestParseValidate_valid(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion command/cliconfig/cliconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hashicorp/hcl"

svchost "github.com/hashicorp/terraform-svchost"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

const pluginCacheDirEnvVar = "TF_PLUGIN_CACHE_DIR"
Expand Down
2 changes: 1 addition & 1 deletion command/cliconfig/provider_installation.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
hclast "github.com/hashicorp/hcl/hcl/ast"
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/internal/getproviders"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// ProviderInstallation is the structure of the "provider_installation"
Expand Down
2 changes: 1 addition & 1 deletion command/clistate/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/hashicorp/terraform/command/views"
"github.com/hashicorp/terraform/internal/helper/slowmessage"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/states/statemgr"
"github.com/hashicorp/terraform/tfdiags"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion command/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform/internal/backend"
"github.com/hashicorp/terraform/internal/helper/wrappedstreams"
"github.com/hashicorp/terraform/internal/repl"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"

"github.com/mitchellh/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion command/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/mitchellh/cli"

"github.com/hashicorp/terraform/configs"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion command/format/diagnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

viewsjson "github.com/hashicorp/terraform/command/views/json"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"

"github.com/mitchellh/colorstring"
wordwrap "github.com/mitchellh/go-wordwrap"
Expand Down
2 changes: 1 addition & 1 deletion command/format/diagnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

viewsjson "github.com/hashicorp/terraform/command/views/json"

"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

func TestDiagnostic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion command/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// GetCommand is a Command implementation that takes a Terraform
Expand Down
2 changes: 1 addition & 1 deletion command/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/plans/planfile"
"github.com/hashicorp/terraform/tfdiags"

"github.com/hashicorp/terraform/internal/backend"
"github.com/hashicorp/terraform/internal/dag"
Expand Down
2 changes: 1 addition & 1 deletion command/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/hashicorp/terraform/command/views"
"github.com/hashicorp/terraform/configs"
"github.com/hashicorp/terraform/internal/backend"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
)

// ImportCommand is a cli.Command implementation that imports resources
Expand Down
2 changes: 1 addition & 1 deletion command/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/internal/copy"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/tfdiags"
)

func TestImport(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion command/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
backendInit "github.com/hashicorp/terraform/internal/backend/init"
"github.com/hashicorp/terraform/internal/getproviders"
"github.com/hashicorp/terraform/internal/providercache"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/states"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
tfversion "github.com/hashicorp/terraform/version"
)

Expand Down
2 changes: 1 addition & 1 deletion command/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/hashicorp/terraform-svchost/disco"
"github.com/hashicorp/terraform/command/cliconfig"
"github.com/hashicorp/terraform/internal/httpclient"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"

uuid "github.com/hashicorp/go-uuid"
"golang.org/x/oauth2"
Expand Down
2 changes: 1 addition & 1 deletion command/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

svchost "github.com/hashicorp/terraform-svchost"
"github.com/hashicorp/terraform/command/cliconfig"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// LogoutCommand is a Command implementation which removes stored credentials
Expand Down
2 changes: 1 addition & 1 deletion command/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"github.com/hashicorp/terraform/internal/backend/local"
"github.com/hashicorp/terraform/internal/getproviders"
"github.com/hashicorp/terraform/internal/terminal"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/provisioners"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
"github.com/mitchellh/cli"
"github.com/mitchellh/colorstring"

Expand Down
2 changes: 1 addition & 1 deletion command/meta_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"github.com/hashicorp/terraform/configs"
"github.com/hashicorp/terraform/internal/backend"
remoteBackend "github.com/hashicorp/terraform/internal/backend/remote"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/plans"
"github.com/hashicorp/terraform/states/statemgr"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
"github.com/zclconf/go-cty/cty"
ctyjson "github.com/zclconf/go-cty/cty/json"

Expand Down
2 changes: 1 addition & 1 deletion command/meta_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/hashicorp/terraform/internal/earlyconfig"
"github.com/hashicorp/terraform/internal/initwd"
"github.com/hashicorp/terraform/internal/registry"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert"
)
Expand Down
2 changes: 1 addition & 1 deletion command/meta_dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"

"github.com/hashicorp/terraform/internal/depsfile"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// dependenclyLockFilename is the filename of the dependency lock file.
Expand Down
2 changes: 1 addition & 1 deletion command/meta_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"github.com/hashicorp/terraform/internal/logging"
"github.com/hashicorp/terraform/internal/moduletest"
"github.com/hashicorp/terraform/internal/providercache"
"github.com/hashicorp/terraform/internal/tfdiags"
tfplugin "github.com/hashicorp/terraform/plugin"
tfplugin6 "github.com/hashicorp/terraform/plugin6"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/tfdiags"
)

// The TF_DISABLE_PLUGIN_TLS environment variable is intended only for use by
Expand Down
2 changes: 1 addition & 1 deletion command/meta_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
hcljson "github.com/hashicorp/hcl/v2/json"
"github.com/hashicorp/terraform/configs"
"github.com/hashicorp/terraform/internal/backend"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform/tfdiags"
)

// VarEnvPrefix is the prefix for environment variables that represent values
Expand Down
2 changes: 1 addition & 1 deletion command/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/hashicorp/terraform/command/arguments"
"github.com/hashicorp/terraform/command/views"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/hashicorp/terraform/states"
"github.com/hashicorp/terraform/tfdiags"
)

// OutputCommand is a Command implementation that reads an output
Expand Down
2 changes: 1 addition & 1 deletion command/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/hashicorp/terraform/command/arguments"
"github.com/hashicorp/terraform/command/views"
"github.com/hashicorp/terraform/internal/backend"
"github.com/hashicorp/terraform/tfdiags"
"github.com/hashicorp/terraform/internal/tfdiags"
)

// PlanCommand is a Command implementation that compares a Terraform
Expand Down
Loading

0 comments on commit 05caff2

Please sign in to comment.