diff --git a/internal/command/jsonconfig/expression.go b/internal/command/jsonconfig/expression.go index b948d7e29..1ba27eb03 100644 --- a/internal/command/jsonconfig/expression.go +++ b/internal/command/jsonconfig/expression.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hcldec" "github.com/hashicorp/terraform/internal/configs/configschema" - "github.com/hashicorp/terraform/lang" + "github.com/hashicorp/terraform/internal/lang" "github.com/zclconf/go-cty/cty" ctyjson "github.com/zclconf/go-cty/cty/json" ) diff --git a/lang/blocktoattr/doc.go b/internal/lang/blocktoattr/doc.go similarity index 100% rename from lang/blocktoattr/doc.go rename to internal/lang/blocktoattr/doc.go diff --git a/lang/blocktoattr/fixup.go b/internal/lang/blocktoattr/fixup.go similarity index 100% rename from lang/blocktoattr/fixup.go rename to internal/lang/blocktoattr/fixup.go diff --git a/lang/blocktoattr/fixup_bench_test.go b/internal/lang/blocktoattr/fixup_bench_test.go similarity index 100% rename from lang/blocktoattr/fixup_bench_test.go rename to internal/lang/blocktoattr/fixup_bench_test.go diff --git a/lang/blocktoattr/fixup_test.go b/internal/lang/blocktoattr/fixup_test.go similarity index 100% rename from lang/blocktoattr/fixup_test.go rename to internal/lang/blocktoattr/fixup_test.go diff --git a/lang/blocktoattr/schema.go b/internal/lang/blocktoattr/schema.go similarity index 100% rename from lang/blocktoattr/schema.go rename to internal/lang/blocktoattr/schema.go diff --git a/lang/blocktoattr/variables.go b/internal/lang/blocktoattr/variables.go similarity index 100% rename from lang/blocktoattr/variables.go rename to internal/lang/blocktoattr/variables.go diff --git a/lang/blocktoattr/variables_test.go b/internal/lang/blocktoattr/variables_test.go similarity index 100% rename from lang/blocktoattr/variables_test.go rename to internal/lang/blocktoattr/variables_test.go diff --git a/lang/data.go b/internal/lang/data.go similarity index 100% rename from lang/data.go rename to internal/lang/data.go diff --git a/lang/data_test.go b/internal/lang/data_test.go similarity index 100% rename from lang/data_test.go rename to internal/lang/data_test.go diff --git a/lang/doc.go b/internal/lang/doc.go similarity index 100% rename from lang/doc.go rename to internal/lang/doc.go diff --git a/lang/eval.go b/internal/lang/eval.go similarity index 99% rename from lang/eval.go rename to internal/lang/eval.go index b49e26b02..303a8b3ac 100644 --- a/lang/eval.go +++ b/internal/lang/eval.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/instances" + "github.com/hashicorp/terraform/internal/lang/blocktoattr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang/blocktoattr" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/lang/eval_test.go b/internal/lang/eval_test.go similarity index 100% rename from lang/eval_test.go rename to internal/lang/eval_test.go diff --git a/lang/funcs/cidr.go b/internal/lang/funcs/cidr.go similarity index 100% rename from lang/funcs/cidr.go rename to internal/lang/funcs/cidr.go diff --git a/lang/funcs/cidr_test.go b/internal/lang/funcs/cidr_test.go similarity index 100% rename from lang/funcs/cidr_test.go rename to internal/lang/funcs/cidr_test.go diff --git a/lang/funcs/collection.go b/internal/lang/funcs/collection.go similarity index 100% rename from lang/funcs/collection.go rename to internal/lang/funcs/collection.go diff --git a/lang/funcs/collection_test.go b/internal/lang/funcs/collection_test.go similarity index 100% rename from lang/funcs/collection_test.go rename to internal/lang/funcs/collection_test.go diff --git a/lang/funcs/conversion.go b/internal/lang/funcs/conversion.go similarity index 100% rename from lang/funcs/conversion.go rename to internal/lang/funcs/conversion.go diff --git a/lang/funcs/conversion_test.go b/internal/lang/funcs/conversion_test.go similarity index 100% rename from lang/funcs/conversion_test.go rename to internal/lang/funcs/conversion_test.go diff --git a/lang/funcs/crypto.go b/internal/lang/funcs/crypto.go similarity index 100% rename from lang/funcs/crypto.go rename to internal/lang/funcs/crypto.go diff --git a/lang/funcs/crypto_test.go b/internal/lang/funcs/crypto_test.go similarity index 100% rename from lang/funcs/crypto_test.go rename to internal/lang/funcs/crypto_test.go diff --git a/lang/funcs/datetime.go b/internal/lang/funcs/datetime.go similarity index 100% rename from lang/funcs/datetime.go rename to internal/lang/funcs/datetime.go diff --git a/lang/funcs/datetime_test.go b/internal/lang/funcs/datetime_test.go similarity index 100% rename from lang/funcs/datetime_test.go rename to internal/lang/funcs/datetime_test.go diff --git a/lang/funcs/defaults.go b/internal/lang/funcs/defaults.go similarity index 100% rename from lang/funcs/defaults.go rename to internal/lang/funcs/defaults.go diff --git a/lang/funcs/defaults_test.go b/internal/lang/funcs/defaults_test.go similarity index 100% rename from lang/funcs/defaults_test.go rename to internal/lang/funcs/defaults_test.go diff --git a/lang/funcs/encoding.go b/internal/lang/funcs/encoding.go similarity index 100% rename from lang/funcs/encoding.go rename to internal/lang/funcs/encoding.go diff --git a/lang/funcs/encoding_test.go b/internal/lang/funcs/encoding_test.go similarity index 100% rename from lang/funcs/encoding_test.go rename to internal/lang/funcs/encoding_test.go diff --git a/lang/funcs/filesystem.go b/internal/lang/funcs/filesystem.go similarity index 100% rename from lang/funcs/filesystem.go rename to internal/lang/funcs/filesystem.go diff --git a/lang/funcs/filesystem_test.go b/internal/lang/funcs/filesystem_test.go similarity index 100% rename from lang/funcs/filesystem_test.go rename to internal/lang/funcs/filesystem_test.go diff --git a/lang/funcs/number.go b/internal/lang/funcs/number.go similarity index 100% rename from lang/funcs/number.go rename to internal/lang/funcs/number.go diff --git a/lang/funcs/number_test.go b/internal/lang/funcs/number_test.go similarity index 100% rename from lang/funcs/number_test.go rename to internal/lang/funcs/number_test.go diff --git a/lang/funcs/sensitive.go b/internal/lang/funcs/sensitive.go similarity index 100% rename from lang/funcs/sensitive.go rename to internal/lang/funcs/sensitive.go diff --git a/lang/funcs/sensitive_test.go b/internal/lang/funcs/sensitive_test.go similarity index 100% rename from lang/funcs/sensitive_test.go rename to internal/lang/funcs/sensitive_test.go diff --git a/lang/funcs/string.go b/internal/lang/funcs/string.go similarity index 100% rename from lang/funcs/string.go rename to internal/lang/funcs/string.go diff --git a/lang/funcs/string_test.go b/internal/lang/funcs/string_test.go similarity index 100% rename from lang/funcs/string_test.go rename to internal/lang/funcs/string_test.go diff --git a/lang/funcs/testdata/bare.tmpl b/internal/lang/funcs/testdata/bare.tmpl similarity index 100% rename from lang/funcs/testdata/bare.tmpl rename to internal/lang/funcs/testdata/bare.tmpl diff --git a/lang/funcs/testdata/func.tmpl b/internal/lang/funcs/testdata/func.tmpl similarity index 100% rename from lang/funcs/testdata/func.tmpl rename to internal/lang/funcs/testdata/func.tmpl diff --git a/lang/funcs/testdata/hello.tmpl b/internal/lang/funcs/testdata/hello.tmpl similarity index 100% rename from lang/funcs/testdata/hello.tmpl rename to internal/lang/funcs/testdata/hello.tmpl diff --git a/lang/funcs/testdata/hello.txt b/internal/lang/funcs/testdata/hello.txt similarity index 100% rename from lang/funcs/testdata/hello.txt rename to internal/lang/funcs/testdata/hello.txt diff --git a/lang/funcs/testdata/icon.png b/internal/lang/funcs/testdata/icon.png similarity index 100% rename from lang/funcs/testdata/icon.png rename to internal/lang/funcs/testdata/icon.png diff --git a/lang/funcs/testdata/list.tmpl b/internal/lang/funcs/testdata/list.tmpl similarity index 100% rename from lang/funcs/testdata/list.tmpl rename to internal/lang/funcs/testdata/list.tmpl diff --git a/lang/funcs/testdata/recursive.tmpl b/internal/lang/funcs/testdata/recursive.tmpl similarity index 100% rename from lang/funcs/testdata/recursive.tmpl rename to internal/lang/funcs/testdata/recursive.tmpl diff --git a/lang/functions.go b/internal/lang/functions.go similarity index 99% rename from lang/functions.go rename to internal/lang/functions.go index 66c05742b..f367f6cf7 100644 --- a/lang/functions.go +++ b/internal/lang/functions.go @@ -10,7 +10,7 @@ import ( "github.com/zclconf/go-cty/cty/function/stdlib" "github.com/hashicorp/terraform/internal/experiments" - "github.com/hashicorp/terraform/lang/funcs" + "github.com/hashicorp/terraform/internal/lang/funcs" ) var impureFunctions = []string{ diff --git a/lang/functions_test.go b/internal/lang/functions_test.go similarity index 100% rename from lang/functions_test.go rename to internal/lang/functions_test.go diff --git a/lang/references.go b/internal/lang/references.go similarity index 98% rename from lang/references.go rename to internal/lang/references.go index eb4e3f435..7f41b09b6 100644 --- a/lang/references.go +++ b/internal/lang/references.go @@ -4,8 +4,8 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/lang/blocktoattr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang/blocktoattr" ) // References finds all of the references in the given set of traversals, diff --git a/lang/scope.go b/internal/lang/scope.go similarity index 100% rename from lang/scope.go rename to internal/lang/scope.go diff --git a/lang/testdata/functions-test/hello.tmpl b/internal/lang/testdata/functions-test/hello.tmpl similarity index 100% rename from lang/testdata/functions-test/hello.tmpl rename to internal/lang/testdata/functions-test/hello.tmpl diff --git a/lang/testdata/functions-test/hello.txt b/internal/lang/testdata/functions-test/hello.txt similarity index 100% rename from lang/testdata/functions-test/hello.txt rename to internal/lang/testdata/functions-test/hello.txt diff --git a/lang/testdata/functions-test/subdirectory/hello.tmpl b/internal/lang/testdata/functions-test/subdirectory/hello.tmpl similarity index 100% rename from lang/testdata/functions-test/subdirectory/hello.tmpl rename to internal/lang/testdata/functions-test/subdirectory/hello.tmpl diff --git a/lang/testdata/functions-test/subdirectory/hello.txt b/internal/lang/testdata/functions-test/subdirectory/hello.txt similarity index 100% rename from lang/testdata/functions-test/subdirectory/hello.txt rename to internal/lang/testdata/functions-test/subdirectory/hello.txt diff --git a/internal/repl/session.go b/internal/repl/session.go index 832d07056..a9b7b1b12 100644 --- a/internal/repl/session.go +++ b/internal/repl/session.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" ) // Session represents the state for a single REPL session. diff --git a/terraform/context.go b/terraform/context.go index fe06a5114..15e85327a 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -11,10 +11,10 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/instances" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/plans" "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" diff --git a/terraform/eval_context.go b/terraform/eval_context.go index 8e381b0c3..2ed8d823e 100644 --- a/terraform/eval_context.go +++ b/terraform/eval_context.go @@ -5,10 +5,10 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/instances" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/plans" "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" diff --git a/terraform/eval_context_builtin.go b/terraform/eval_context_builtin.go index cff23ff68..845c98850 100644 --- a/terraform/eval_context_builtin.go +++ b/terraform/eval_context_builtin.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/internal/addrs" "github.com/zclconf/go-cty/cty" diff --git a/terraform/eval_context_mock.go b/terraform/eval_context_mock.go index 1813653e6..435ae4277 100644 --- a/terraform/eval_context_mock.go +++ b/terraform/eval_context_mock.go @@ -6,10 +6,10 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/instances" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/plans" "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" diff --git a/terraform/eval_for_each.go b/terraform/eval_for_each.go index 7766de506..3d1710ab8 100644 --- a/terraform/eval_for_each.go +++ b/terraform/eval_for_each.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/hashicorp/hcl/v2" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/evaluate.go b/terraform/evaluate.go index 1f03e14fa..dcf1f60fb 100644 --- a/terraform/evaluate.go +++ b/terraform/evaluate.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/instances" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/plans" "github.com/hashicorp/terraform/states" ) diff --git a/terraform/evaluate_valid_test.go b/terraform/evaluate_valid_test.go index 0e27da34d..ff8ca4397 100644 --- a/terraform/evaluate_valid_test.go +++ b/terraform/evaluate_valid_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" - "github.com/hashicorp/terraform/lang" + "github.com/hashicorp/terraform/internal/lang" ) func TestStaticValidateReferences(t *testing.T) { diff --git a/terraform/node_local.go b/terraform/node_local.go index cf8f9832f..79b475768 100644 --- a/terraform/node_local.go +++ b/terraform/node_local.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_module_expand.go b/terraform/node_module_expand.go index f955be323..49389ac65 100644 --- a/terraform/node_module_expand.go +++ b/terraform/node_module_expand.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" ) type ConcreteModuleNodeFunc func(n *nodeExpandModule) dag.Vertex diff --git a/terraform/node_module_variable.go b/terraform/node_module_variable.go index 88a9a9c23..38ac62ac0 100644 --- a/terraform/node_module_variable.go +++ b/terraform/node_module_variable.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" "github.com/hashicorp/terraform/internal/instances" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/terraform/node_output.go b/terraform/node_output.go index d9e361882..db34808de 100644 --- a/terraform/node_output.go +++ b/terraform/node_output.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/plans" "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" diff --git a/terraform/node_resource_abstract.go b/terraform/node_resource_abstract.go index d7a7eadbe..1b6f57694 100644 --- a/terraform/node_resource_abstract.go +++ b/terraform/node_resource_abstract.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/dag" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" "github.com/hashicorp/terraform/states" ) diff --git a/terraform/node_resource_apply.go b/terraform/node_resource_apply.go index 599130342..3928bea0f 100644 --- a/terraform/node_resource_apply.go +++ b/terraform/node_resource_apply.go @@ -5,8 +5,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/dag" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" ) // nodeExpandApplyableResource handles the first layer of resource diff --git a/terraform/transform_reference.go b/terraform/transform_reference.go index 7d256adc7..fea90592e 100644 --- a/terraform/transform_reference.go +++ b/terraform/transform_reference.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/dag" - "github.com/hashicorp/terraform/lang" + "github.com/hashicorp/terraform/internal/lang" ) // GraphNodeReferenceable must be implemented by any node that represents diff --git a/terraform/validate_selfref.go b/terraform/validate_selfref.go index 01d98d4de..ff00cded7 100644 --- a/terraform/validate_selfref.go +++ b/terraform/validate_selfref.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/lang" ) // validateSelfRef checks to ensure that expressions within a particular