From f40800b3a43851bbbbb98adff9e4eeab0fb575ca Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 17 May 2021 12:43:35 -0700 Subject: [PATCH] Move states/ to internal/states/ 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. --- internal/backend/backend.go | 4 ++-- internal/backend/local/backend.go | 2 +- internal/backend/local/backend_apply.go | 6 +++--- internal/backend/local/backend_apply_test.go | 4 ++-- internal/backend/local/backend_local.go | 2 +- internal/backend/local/backend_plan.go | 4 ++-- internal/backend/local/backend_plan_test.go | 2 +- internal/backend/local/backend_refresh.go | 4 ++-- internal/backend/local/backend_refresh_test.go | 2 +- internal/backend/local/backend_test.go | 4 ++-- internal/backend/local/hook_state.go | 4 ++-- internal/backend/local/hook_state_test.go | 2 +- internal/backend/local/testing.go | 4 ++-- internal/backend/remote-state/artifactory/backend.go | 4 ++-- internal/backend/remote-state/artifactory/client.go | 2 +- internal/backend/remote-state/artifactory/client_test.go | 2 +- internal/backend/remote-state/azure/backend_state.go | 6 +++--- internal/backend/remote-state/azure/client.go | 4 ++-- internal/backend/remote-state/azure/client_test.go | 2 +- internal/backend/remote-state/consul/backend_state.go | 6 +++--- internal/backend/remote-state/consul/client.go | 4 ++-- internal/backend/remote-state/consul/client_test.go | 4 ++-- internal/backend/remote-state/cos/backend_state.go | 6 +++--- internal/backend/remote-state/cos/backend_test.go | 2 +- internal/backend/remote-state/cos/client.go | 4 ++-- internal/backend/remote-state/etcdv2/backend.go | 4 ++-- internal/backend/remote-state/etcdv2/client.go | 2 +- internal/backend/remote-state/etcdv2/client_test.go | 2 +- internal/backend/remote-state/etcdv3/backend_state.go | 6 +++--- internal/backend/remote-state/etcdv3/client.go | 4 ++-- internal/backend/remote-state/etcdv3/client_test.go | 4 ++-- internal/backend/remote-state/gcs/backend_state.go | 6 +++--- internal/backend/remote-state/gcs/backend_test.go | 2 +- internal/backend/remote-state/gcs/client.go | 4 ++-- internal/backend/remote-state/http/backend.go | 4 ++-- internal/backend/remote-state/http/client.go | 4 ++-- internal/backend/remote-state/http/client_test.go | 2 +- internal/backend/remote-state/inmem/backend.go | 6 +++--- internal/backend/remote-state/inmem/backend_test.go | 4 ++-- internal/backend/remote-state/inmem/client.go | 4 ++-- internal/backend/remote-state/inmem/client_test.go | 2 +- internal/backend/remote-state/kubernetes/backend_state.go | 6 +++--- internal/backend/remote-state/kubernetes/backend_test.go | 2 +- internal/backend/remote-state/kubernetes/client.go | 4 ++-- internal/backend/remote-state/kubernetes/client_test.go | 4 ++-- internal/backend/remote-state/manta/backend_state.go | 6 +++--- internal/backend/remote-state/manta/client.go | 4 ++-- internal/backend/remote-state/manta/client_test.go | 2 +- internal/backend/remote-state/oss/backend_state.go | 6 +++--- internal/backend/remote-state/oss/client.go | 4 ++-- internal/backend/remote-state/oss/client_test.go | 6 +++--- internal/backend/remote-state/pg/backend_state.go | 6 +++--- internal/backend/remote-state/pg/backend_test.go | 4 ++-- internal/backend/remote-state/pg/client.go | 4 ++-- internal/backend/remote-state/pg/client_test.go | 2 +- internal/backend/remote-state/s3/backend_state.go | 6 +++--- internal/backend/remote-state/s3/backend_test.go | 4 ++-- internal/backend/remote-state/s3/client.go | 4 ++-- internal/backend/remote-state/s3/client_test.go | 6 +++--- internal/backend/remote-state/swift/backend_state.go | 6 +++--- internal/backend/remote-state/swift/client.go | 4 ++-- internal/backend/remote-state/swift/client_test.go | 2 +- internal/backend/remote/backend.go | 4 ++-- internal/backend/remote/backend_apply_test.go | 2 +- internal/backend/remote/backend_context.go | 2 +- internal/backend/remote/backend_context_test.go | 2 +- internal/backend/remote/backend_plan_test.go | 2 +- internal/backend/remote/backend_state.go | 6 +++--- internal/backend/remote/backend_state_test.go | 6 +++--- internal/backend/remote/testing.go | 2 +- internal/backend/testing.go | 4 ++-- .../builtin/providers/terraform/data_source_state_test.go | 2 +- internal/command/apply_destroy_test.go | 4 ++-- internal/command/apply_test.go | 4 ++-- internal/command/clistate/local_state.go | 2 +- internal/command/clistate/state.go | 2 +- internal/command/clistate/state_test.go | 2 +- internal/command/command_test.go | 6 +++--- internal/command/format/diff.go | 2 +- internal/command/format/diff_test.go | 2 +- internal/command/format/state.go | 2 +- internal/command/format/state_test.go | 2 +- internal/command/graph_test.go | 2 +- internal/command/init.go | 2 +- internal/command/init_test.go | 4 ++-- internal/command/jsonplan/plan.go | 4 ++-- internal/command/jsonstate/state.go | 4 ++-- internal/command/jsonstate/state_test.go | 2 +- internal/command/meta_backend.go | 2 +- internal/command/meta_backend_migrate.go | 4 ++-- internal/command/meta_backend_test.go | 6 +++--- internal/command/output.go | 2 +- internal/command/output_test.go | 2 +- internal/command/plan_test.go | 2 +- internal/command/refresh_test.go | 6 +++--- internal/command/show.go | 4 ++-- internal/command/show_test.go | 2 +- internal/command/state_list.go | 2 +- internal/command/state_meta.go | 4 ++-- internal/command/state_mv.go | 2 +- internal/command/state_mv_test.go | 2 +- internal/command/state_pull.go | 4 ++-- internal/command/state_push.go | 4 ++-- internal/command/state_push_test.go | 2 +- internal/command/state_replace_provider.go | 2 +- internal/command/state_replace_provider_test.go | 2 +- internal/command/state_rm_test.go | 2 +- internal/command/state_show.go | 2 +- internal/command/state_show_test.go | 2 +- internal/command/state_test.go | 2 +- internal/command/taint.go | 2 +- internal/command/taint_test.go | 2 +- internal/command/test.go | 2 +- internal/command/testdata/statelocker.go | 2 +- internal/command/unlock.go | 2 +- internal/command/untaint.go | 2 +- internal/command/untaint_test.go | 2 +- internal/command/views/apply.go | 2 +- internal/command/views/apply_test.go | 2 +- internal/command/views/hook_count.go | 2 +- internal/command/views/hook_count_test.go | 2 +- internal/command/views/hook_json.go | 2 +- internal/command/views/hook_json_test.go | 2 +- internal/command/views/hook_ui.go | 2 +- internal/command/views/hook_ui_test.go | 2 +- internal/command/views/json/output.go | 2 +- internal/command/views/json/output_test.go | 2 +- internal/command/views/operation.go | 2 +- internal/command/views/operation_test.go | 4 ++-- internal/command/views/output.go | 2 +- internal/command/views/output_test.go | 2 +- internal/command/views/plan.go | 2 +- internal/command/views/refresh.go | 2 +- internal/command/views/refresh_test.go | 2 +- internal/command/workspace_command_test.go | 4 ++-- internal/command/workspace_new.go | 2 +- internal/e2e/e2e.go | 4 ++-- internal/legacy/terraform/schemas.go | 2 +- internal/plans/changes.go | 2 +- internal/plans/changes_src.go | 2 +- internal/plans/changes_state.go | 2 +- internal/plans/changes_sync.go | 2 +- internal/plans/plan.go | 2 +- internal/plans/planfile/planfile_test.go | 4 ++-- internal/plans/planfile/reader.go | 2 +- internal/plans/planfile/tfplan.go | 2 +- internal/plans/planfile/writer.go | 2 +- internal/providers/provider.go | 2 +- internal/repl/session_test.go | 2 +- {states => internal/states}/doc.go | 0 {states => internal/states}/instance_generation.go | 0 {states => internal/states}/instance_object.go | 0 {states => internal/states}/instance_object_src.go | 0 {states => internal/states}/module.go | 0 {states => internal/states}/objectstatus_string.go | 0 {states => internal/states}/output_value.go | 0 {states => internal/states}/remote/remote.go | 2 +- {states => internal/states}/remote/remote_test.go | 0 {states => internal/states}/remote/state.go | 6 +++--- {states => internal/states}/remote/state_test.go | 6 +++--- {states => internal/states}/remote/testing.go | 4 ++-- {states => internal/states}/resource.go | 0 {states => internal/states}/resource_test.go | 0 {states => internal/states}/state.go | 0 {states => internal/states}/state_deepcopy.go | 0 {states => internal/states}/state_equal.go | 0 {states => internal/states}/state_string.go | 0 {states => internal/states}/state_test.go | 0 {states => internal/states}/statefile/diagnostics.go | 0 {states => internal/states}/statefile/doc.go | 0 {states => internal/states}/statefile/file.go | 2 +- {states => internal/states}/statefile/marshal_equal.go | 2 +- {states => internal/states}/statefile/read.go | 0 {states => internal/states}/statefile/roundtrip_test.go | 0 .../statefile/testdata/roundtrip/v1-simple.in.tfstate | 0 .../statefile/testdata/roundtrip/v1-simple.out.tfstate | 0 .../statefile/testdata/roundtrip/v3-bigint.in.tfstate | 0 .../statefile/testdata/roundtrip/v3-bigint.out.tfstate | 0 .../statefile/testdata/roundtrip/v3-builtin.in.tfstate | 0 .../statefile/testdata/roundtrip/v3-builtin.out.tfstate | 0 .../statefile/testdata/roundtrip/v3-grabbag.in.tfstate | 0 .../statefile/testdata/roundtrip/v3-grabbag.out.tfstate | 0 .../testdata/roundtrip/v3-invalid-depends.in.tfstate | 0 .../testdata/roundtrip/v3-invalid-depends.out.tfstate | 0 .../statefile/testdata/roundtrip/v3-simple.in.tfstate | 0 .../statefile/testdata/roundtrip/v3-simple.out.tfstate | 0 .../states}/statefile/testdata/roundtrip/v4-cbd.in.tfstate | 0 .../states}/statefile/testdata/roundtrip/v4-cbd.out.tfstate | 0 .../statefile/testdata/roundtrip/v4-foreach.in.tfstate | 0 .../statefile/testdata/roundtrip/v4-foreach.out.tfstate | 0 .../statefile/testdata/roundtrip/v4-future.in.tfstate | 0 .../statefile/testdata/roundtrip/v4-future.out.tfstate | 0 .../testdata/roundtrip/v4-legacy-foreach.in.tfstate | 0 .../testdata/roundtrip/v4-legacy-foreach.out.tfstate | 0 .../testdata/roundtrip/v4-legacy-modules.in.tfstate | 0 .../testdata/roundtrip/v4-legacy-modules.out.tfstate | 0 .../testdata/roundtrip/v4-legacy-simple.in.tfstate | 0 .../testdata/roundtrip/v4-legacy-simple.out.tfstate | 0 .../statefile/testdata/roundtrip/v4-modules.in.tfstate | 0 .../statefile/testdata/roundtrip/v4-modules.out.tfstate | 0 .../statefile/testdata/roundtrip/v4-simple.in.tfstate | 0 .../statefile/testdata/roundtrip/v4-simple.out.tfstate | 0 {states => internal/states}/statefile/version0.go | 0 {states => internal/states}/statefile/version1.go | 0 {states => internal/states}/statefile/version1_upgrade.go | 0 {states => internal/states}/statefile/version2.go | 0 {states => internal/states}/statefile/version2_upgrade.go | 0 {states => internal/states}/statefile/version3.go | 0 {states => internal/states}/statefile/version3_upgrade.go | 2 +- {states => internal/states}/statefile/version4.go | 2 +- {states => internal/states}/statefile/version4_test.go | 0 {states => internal/states}/statefile/write.go | 0 {states => internal/states}/statemgr/doc.go | 0 {states => internal/states}/statemgr/filesystem.go | 4 ++-- .../states}/statemgr/filesystem_lock_unix.go | 0 .../states}/statemgr/filesystem_lock_windows.go | 0 {states => internal/states}/statemgr/filesystem_test.go | 4 ++-- {states => internal/states}/statemgr/helper.go | 4 ++-- {states => internal/states}/statemgr/lineage.go | 0 {states => internal/states}/statemgr/lock.go | 2 +- {states => internal/states}/statemgr/lock_test.go | 0 {states => internal/states}/statemgr/locker.go | 0 {states => internal/states}/statemgr/migrate.go | 2 +- {states => internal/states}/statemgr/migrate_test.go | 4 ++-- {states => internal/states}/statemgr/persistent.go | 0 {states => internal/states}/statemgr/plan.go | 4 ++-- .../states}/statemgr/snapshotmetarel_string.go | 0 {states => internal/states}/statemgr/statemgr.go | 0 {states => internal/states}/statemgr/statemgr_fake.go | 2 +- {states => internal/states}/statemgr/statemgr_test.go | 0 {states => internal/states}/statemgr/testdata/lockstate.go | 2 +- {states => internal/states}/statemgr/testing.go | 4 ++-- {states => internal/states}/statemgr/transient.go | 2 +- {states => internal/states}/statemgr/transient_inmem.go | 2 +- {states => internal/states}/sync.go | 0 terraform/context.go | 2 +- terraform/context_apply2_test.go | 2 +- terraform/context_apply_test.go | 2 +- terraform/context_import.go | 2 +- terraform/context_import_test.go | 2 +- terraform/context_input_test.go | 2 +- terraform/context_plan2_test.go | 2 +- terraform/context_plan_test.go | 2 +- terraform/context_refresh_test.go | 2 +- terraform/context_test.go | 4 ++-- terraform/context_validate_test.go | 2 +- terraform/eval_context.go | 2 +- terraform/eval_context_builtin.go | 2 +- terraform/eval_context_mock.go | 2 +- terraform/evaluate.go | 2 +- terraform/evaluate_test.go | 2 +- terraform/graph_builder_apply.go | 2 +- terraform/graph_builder_apply_test.go | 2 +- terraform/graph_builder_destroy_plan.go | 2 +- terraform/graph_builder_eval.go | 2 +- terraform/graph_builder_plan.go | 2 +- terraform/graph_walk_context.go | 2 +- terraform/hook.go | 2 +- terraform/hook_mock.go | 2 +- terraform/hook_stop.go | 2 +- terraform/hook_test.go | 2 +- terraform/node_count_boundary_test.go | 2 +- terraform/node_data_destroy_test.go | 2 +- terraform/node_local_test.go | 2 +- terraform/node_module_expand_test.go | 2 +- terraform/node_output.go | 2 +- terraform/node_output_test.go | 2 +- terraform/node_resource_abstract.go | 2 +- terraform/node_resource_abstract_instance.go | 2 +- terraform/node_resource_abstract_instance_test.go | 2 +- terraform/node_resource_abstract_test.go | 2 +- terraform/node_resource_apply_instance.go | 2 +- terraform/node_resource_apply_test.go | 2 +- terraform/node_resource_destroy.go | 2 +- terraform/node_resource_destroy_deposed.go | 2 +- terraform/node_resource_destroy_deposed_test.go | 2 +- terraform/node_resource_plan.go | 2 +- terraform/node_resource_plan_destroy.go | 2 +- terraform/node_resource_plan_instance.go | 2 +- terraform/node_resource_plan_orphan.go | 2 +- terraform/node_resource_plan_orphan_test.go | 2 +- terraform/node_resource_plan_test.go | 2 +- terraform/schemas.go | 2 +- terraform/terraform_test.go | 2 +- terraform/transform_attach_state.go | 2 +- terraform/transform_destroy_cbd.go | 2 +- terraform/transform_destroy_cbd_test.go | 2 +- terraform/transform_destroy_edge.go | 2 +- terraform/transform_destroy_edge_test.go | 2 +- terraform/transform_diff.go | 2 +- terraform/transform_import_state.go | 2 +- terraform/transform_import_state_test.go | 2 +- terraform/transform_orphan_count.go | 2 +- terraform/transform_orphan_count_test.go | 2 +- terraform/transform_orphan_output.go | 2 +- terraform/transform_orphan_resource.go | 2 +- terraform/transform_orphan_resource_test.go | 2 +- terraform/transform_removed_modules.go | 2 +- terraform/transform_state.go | 2 +- terraform/update_state_hook_test.go | 2 +- terraform/upgrade_resource_state.go | 2 +- 301 files changed, 332 insertions(+), 332 deletions(-) rename {states => internal/states}/doc.go (100%) rename {states => internal/states}/instance_generation.go (100%) rename {states => internal/states}/instance_object.go (100%) rename {states => internal/states}/instance_object_src.go (100%) rename {states => internal/states}/module.go (100%) rename {states => internal/states}/objectstatus_string.go (100%) rename {states => internal/states}/output_value.go (100%) rename {states => internal/states}/remote/remote.go (94%) rename {states => internal/states}/remote/remote_test.go (100%) rename {states => internal/states}/remote/state.go (97%) rename {states => internal/states}/remote/state_test.go (99%) rename {states => internal/states}/remote/testing.go (94%) rename {states => internal/states}/resource.go (100%) rename {states => internal/states}/resource_test.go (100%) rename {states => internal/states}/state.go (100%) rename {states => internal/states}/state_deepcopy.go (100%) rename {states => internal/states}/state_equal.go (100%) rename {states => internal/states}/state_string.go (100%) rename {states => internal/states}/state_test.go (100%) rename {states => internal/states}/statefile/diagnostics.go (100%) rename {states => internal/states}/statefile/doc.go (100%) rename {states => internal/states}/statefile/file.go (97%) rename {states => internal/states}/statefile/marshal_equal.go (95%) rename {states => internal/states}/statefile/read.go (100%) rename {states => internal/states}/statefile/roundtrip_test.go (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v1-simple.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v1-simple.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-bigint.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-bigint.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-builtin.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-builtin.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-grabbag.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-grabbag.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-invalid-depends.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-invalid-depends.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-simple.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v3-simple.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-cbd.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-cbd.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-foreach.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-foreach.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-future.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-future.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-legacy-foreach.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-legacy-foreach.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-legacy-modules.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-legacy-modules.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-legacy-simple.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-legacy-simple.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-modules.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-modules.out.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-simple.in.tfstate (100%) rename {states => internal/states}/statefile/testdata/roundtrip/v4-simple.out.tfstate (100%) rename {states => internal/states}/statefile/version0.go (100%) rename {states => internal/states}/statefile/version1.go (100%) rename {states => internal/states}/statefile/version1_upgrade.go (100%) rename {states => internal/states}/statefile/version2.go (100%) rename {states => internal/states}/statefile/version2_upgrade.go (100%) rename {states => internal/states}/statefile/version3.go (100%) rename {states => internal/states}/statefile/version3_upgrade.go (99%) rename {states => internal/states}/statefile/version4.go (99%) rename {states => internal/states}/statefile/version4_test.go (100%) rename {states => internal/states}/statefile/write.go (100%) rename {states => internal/states}/statemgr/doc.go (100%) rename {states => internal/states}/statemgr/filesystem.go (99%) rename {states => internal/states}/statemgr/filesystem_lock_unix.go (100%) rename {states => internal/states}/statemgr/filesystem_lock_windows.go (100%) rename {states => internal/states}/statemgr/filesystem_test.go (98%) rename {states => internal/states}/statemgr/helper.go (93%) rename {states => internal/states}/statemgr/lineage.go (100%) rename {states => internal/states}/statemgr/lock.go (93%) rename {states => internal/states}/statemgr/lock_test.go (100%) rename {states => internal/states}/statemgr/locker.go (100%) rename {states => internal/states}/statemgr/migrate.go (99%) rename {states => internal/states}/statemgr/migrate_test.go (96%) rename {states => internal/states}/statemgr/persistent.go (100%) rename {states => internal/states}/statemgr/plan.go (96%) rename {states => internal/states}/statemgr/snapshotmetarel_string.go (100%) rename {states => internal/states}/statemgr/statemgr.go (100%) rename {states => internal/states}/statemgr/statemgr_fake.go (98%) rename {states => internal/states}/statemgr/statemgr_test.go (100%) rename {states => internal/states}/statemgr/testdata/lockstate.go (88%) rename {states => internal/states}/statemgr/testing.go (97%) rename {states => internal/states}/statemgr/transient.go (98%) rename {states => internal/states}/statemgr/transient_inmem.go (94%) rename {states => internal/states}/sync.go (100%) diff --git a/internal/backend/backend.go b/internal/backend/backend.go index c9366dcf5..8c97f6fa3 100644 --- a/internal/backend/backend.go +++ b/internal/backend/backend.go @@ -19,9 +19,9 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/mitchellh/go-homedir" "github.com/zclconf/go-cty/cty" diff --git a/internal/backend/local/backend.go b/internal/backend/local/backend.go index 93e6dd82a..65e01f26b 100644 --- a/internal/backend/local/backend.go +++ b/internal/backend/local/backend.go @@ -14,8 +14,8 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/local/backend_apply.go b/internal/backend/local/backend_apply.go index c54c34920..49c47b180 100644 --- a/internal/backend/local/backend_apply.go +++ b/internal/backend/local/backend_apply.go @@ -9,10 +9,10 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/backend/local/backend_apply_test.go b/internal/backend/local/backend_apply_test.go index aa3b5dea9..98d6e14a6 100644 --- a/internal/backend/local/backend_apply_test.go +++ b/internal/backend/local/backend_apply_test.go @@ -19,10 +19,10 @@ import ( "github.com/hashicorp/terraform/internal/initwd" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terminal" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/backend/local/backend_local.go b/internal/backend/local/backend_local.go index 167a9dae5..49c965bb8 100644 --- a/internal/backend/local/backend_local.go +++ b/internal/backend/local/backend_local.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configload" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/local/backend_plan.go b/internal/backend/local/backend_plan.go index e62204147..e6998a0a9 100644 --- a/internal/backend/local/backend_plan.go +++ b/internal/backend/local/backend_plan.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/backend/local/backend_plan_test.go b/internal/backend/local/backend_plan_test.go index 0dd5f46f9..24b0af858 100644 --- a/internal/backend/local/backend_plan_test.go +++ b/internal/backend/local/backend_plan_test.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/terraform/internal/initwd" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/local/backend_refresh.go b/internal/backend/local/backend_refresh.go index e74fc0751..fa6424702 100644 --- a/internal/backend/local/backend_refresh.go +++ b/internal/backend/local/backend_refresh.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/internal/backend" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" ) func (b *Local) opRefresh( diff --git a/internal/backend/local/backend_refresh_test.go b/internal/backend/local/backend_refresh_test.go index c6713f3c8..d8539d393 100644 --- a/internal/backend/local/backend_refresh_test.go +++ b/internal/backend/local/backend_refresh_test.go @@ -14,8 +14,8 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/initwd" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" diff --git a/internal/backend/local/backend_test.go b/internal/backend/local/backend_test.go index 237be324d..4e9642660 100644 --- a/internal/backend/local/backend_test.go +++ b/internal/backend/local/backend_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func TestLocal_impl(t *testing.T) { diff --git a/internal/backend/local/hook_state.go b/internal/backend/local/hook_state.go index c54f22371..7d2d00e47 100644 --- a/internal/backend/local/hook_state.go +++ b/internal/backend/local/hook_state.go @@ -3,8 +3,8 @@ package local import ( "sync" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/backend/local/hook_state_test.go b/internal/backend/local/hook_state_test.go index 715f7d27a..0c8962bde 100644 --- a/internal/backend/local/hook_state_test.go +++ b/internal/backend/local/hook_state_test.go @@ -3,7 +3,7 @@ package local import ( "testing" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/backend/local/testing.go b/internal/backend/local/testing.go index 1e26c083f..0e39bc341 100644 --- a/internal/backend/local/testing.go +++ b/internal/backend/local/testing.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/backend/remote-state/artifactory/backend.go b/internal/backend/remote-state/artifactory/backend.go index 56dd50c06..bf2bfcf7e 100644 --- a/internal/backend/remote-state/artifactory/backend.go +++ b/internal/backend/remote-state/artifactory/backend.go @@ -6,8 +6,8 @@ import ( cleanhttp "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/legacy/helper/schema" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" artifactory "github.com/lusis/go-artifactory/src/artifactory.v401" ) diff --git a/internal/backend/remote-state/artifactory/client.go b/internal/backend/remote-state/artifactory/client.go index b6f280e1e..672e1b7f4 100644 --- a/internal/backend/remote-state/artifactory/client.go +++ b/internal/backend/remote-state/artifactory/client.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" artifactory "github.com/lusis/go-artifactory/src/artifactory.v401" ) diff --git a/internal/backend/remote-state/artifactory/client_test.go b/internal/backend/remote-state/artifactory/client_test.go index c46982271..d34aff538 100644 --- a/internal/backend/remote-state/artifactory/client_test.go +++ b/internal/backend/remote-state/artifactory/client_test.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/remote-state/azure/backend_state.go b/internal/backend/remote-state/azure/backend_state.go index 9bd263565..6a1a9c02f 100644 --- a/internal/backend/remote-state/azure/backend_state.go +++ b/internal/backend/remote-state/azure/backend_state.go @@ -7,9 +7,9 @@ import ( "strings" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/tombuildsstuff/giovanni/storage/2018-11-09/blob/blobs" "github.com/tombuildsstuff/giovanni/storage/2018-11-09/blob/containers" ) diff --git a/internal/backend/remote-state/azure/client.go b/internal/backend/remote-state/azure/client.go index d3066454d..36154b79e 100644 --- a/internal/backend/remote-state/azure/client.go +++ b/internal/backend/remote-state/azure/client.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-uuid" "github.com/tombuildsstuff/giovanni/storage/2018-11-09/blob/blobs" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/azure/client_test.go b/internal/backend/remote-state/azure/client_test.go index e01561314..5cc5d6a84 100644 --- a/internal/backend/remote-state/azure/client_test.go +++ b/internal/backend/remote-state/azure/client_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/legacy/helper/acctest" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" "github.com/tombuildsstuff/giovanni/storage/2018-11-09/blob/blobs" ) diff --git a/internal/backend/remote-state/consul/backend_state.go b/internal/backend/remote-state/consul/backend_state.go index e4e2588ad..be1841eb8 100644 --- a/internal/backend/remote-state/consul/backend_state.go +++ b/internal/backend/remote-state/consul/backend_state.go @@ -5,9 +5,9 @@ import ( "strings" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/consul/client.go b/internal/backend/remote-state/consul/client.go index 6173a49e1..ded3371c7 100644 --- a/internal/backend/remote-state/consul/client.go +++ b/internal/backend/remote-state/consul/client.go @@ -15,8 +15,8 @@ import ( consulapi "github.com/hashicorp/consul/api" multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/consul/client_test.go b/internal/backend/remote-state/consul/client_test.go index cd6496611..133122a68 100644 --- a/internal/backend/remote-state/consul/client_test.go +++ b/internal/backend/remote-state/consul/client_test.go @@ -14,8 +14,8 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/cos/backend_state.go b/internal/backend/remote-state/cos/backend_state.go index 91e446e82..c9df2a6c1 100644 --- a/internal/backend/remote-state/cos/backend_state.go +++ b/internal/backend/remote-state/cos/backend_state.go @@ -8,9 +8,9 @@ import ( "strings" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/likexian/gokit/assert" ) diff --git a/internal/backend/remote-state/cos/backend_test.go b/internal/backend/remote-state/cos/backend_test.go index 0b259390e..f527d4a5a 100644 --- a/internal/backend/remote-state/cos/backend_test.go +++ b/internal/backend/remote-state/cos/backend_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" "github.com/likexian/gokit/assert" ) diff --git a/internal/backend/remote-state/cos/client.go b/internal/backend/remote-state/cos/client.go index c3bf1055f..4bd48069a 100644 --- a/internal/backend/remote-state/cos/client.go +++ b/internal/backend/remote-state/cos/client.go @@ -13,8 +13,8 @@ import ( "time" multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" tag "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag/v20180813" "github.com/tencentyun/cos-go-sdk-v5" ) diff --git a/internal/backend/remote-state/etcdv2/backend.go b/internal/backend/remote-state/etcdv2/backend.go index 06bd5f71d..58ecc3b20 100644 --- a/internal/backend/remote-state/etcdv2/backend.go +++ b/internal/backend/remote-state/etcdv2/backend.go @@ -9,8 +9,8 @@ import ( etcdapi "github.com/coreos/etcd/client" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/legacy/helper/schema" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func New() backend.Backend { diff --git a/internal/backend/remote-state/etcdv2/client.go b/internal/backend/remote-state/etcdv2/client.go index eb7517ca0..eab2b1978 100644 --- a/internal/backend/remote-state/etcdv2/client.go +++ b/internal/backend/remote-state/etcdv2/client.go @@ -6,7 +6,7 @@ import ( "fmt" etcdapi "github.com/coreos/etcd/client" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) // EtcdClient is a remote client that stores data in etcd. diff --git a/internal/backend/remote-state/etcdv2/client_test.go b/internal/backend/remote-state/etcdv2/client_test.go index 12e8f5b2c..1d924d4f3 100644 --- a/internal/backend/remote-state/etcdv2/client_test.go +++ b/internal/backend/remote-state/etcdv2/client_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/remote-state/etcdv3/backend_state.go b/internal/backend/remote-state/etcdv3/backend_state.go index 0ee132e22..b9bd3839d 100644 --- a/internal/backend/remote-state/etcdv3/backend_state.go +++ b/internal/backend/remote-state/etcdv3/backend_state.go @@ -9,9 +9,9 @@ import ( etcdv3 "github.com/coreos/etcd/clientv3" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func (b *Backend) Workspaces() ([]string, error) { diff --git a/internal/backend/remote-state/etcdv3/client.go b/internal/backend/remote-state/etcdv3/client.go index 117c951a8..42823e37a 100644 --- a/internal/backend/remote-state/etcdv3/client.go +++ b/internal/backend/remote-state/etcdv3/client.go @@ -11,8 +11,8 @@ import ( etcdv3 "github.com/coreos/etcd/clientv3" etcdv3sync "github.com/coreos/etcd/clientv3/concurrency" "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/etcdv3/client_test.go b/internal/backend/remote-state/etcdv3/client_test.go index f6aa2ed03..5a57e2418 100644 --- a/internal/backend/remote-state/etcdv3/client_test.go +++ b/internal/backend/remote-state/etcdv3/client_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/gcs/backend_state.go b/internal/backend/remote-state/gcs/backend_state.go index 2e88e6e61..ee764efb4 100644 --- a/internal/backend/remote-state/gcs/backend_state.go +++ b/internal/backend/remote-state/gcs/backend_state.go @@ -10,9 +10,9 @@ import ( "google.golang.org/api/iterator" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/gcs/backend_test.go b/internal/backend/remote-state/gcs/backend_test.go index b4b9218d9..bbdd5c61a 100644 --- a/internal/backend/remote-state/gcs/backend_test.go +++ b/internal/backend/remote-state/gcs/backend_test.go @@ -10,7 +10,7 @@ import ( "cloud.google.com/go/storage" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) const ( diff --git a/internal/backend/remote-state/gcs/client.go b/internal/backend/remote-state/gcs/client.go index 4f23434c3..58402fbde 100644 --- a/internal/backend/remote-state/gcs/client.go +++ b/internal/backend/remote-state/gcs/client.go @@ -8,8 +8,8 @@ import ( "cloud.google.com/go/storage" multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "golang.org/x/net/context" ) diff --git a/internal/backend/remote-state/http/backend.go b/internal/backend/remote-state/http/backend.go index f8eb82a42..a3f98c05a 100644 --- a/internal/backend/remote-state/http/backend.go +++ b/internal/backend/remote-state/http/backend.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/go-retryablehttp" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/legacy/helper/schema" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func New() backend.Backend { diff --git a/internal/backend/remote-state/http/client.go b/internal/backend/remote-state/http/client.go index 4c299521f..0aed96886 100644 --- a/internal/backend/remote-state/http/client.go +++ b/internal/backend/remote-state/http/client.go @@ -12,8 +12,8 @@ import ( "net/url" "github.com/hashicorp/go-retryablehttp" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // httpClient is a remote client that stores data in Consul or HTTP REST. diff --git a/internal/backend/remote-state/http/client_test.go b/internal/backend/remote-state/http/client_test.go index c9bce3b78..c8bd121c7 100644 --- a/internal/backend/remote-state/http/client_test.go +++ b/internal/backend/remote-state/http/client_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/hashicorp/go-retryablehttp" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) func TestHTTPClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/inmem/backend.go b/internal/backend/remote-state/inmem/backend.go index a228b18ed..7f8f56ef2 100644 --- a/internal/backend/remote-state/inmem/backend.go +++ b/internal/backend/remote-state/inmem/backend.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/legacy/helper/schema" - statespkg "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + statespkg "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // we keep the states and locks in package-level variables, so that they can be diff --git a/internal/backend/remote-state/inmem/backend_test.go b/internal/backend/remote-state/inmem/backend_test.go index e85b81d9a..395199890 100644 --- a/internal/backend/remote-state/inmem/backend_test.go +++ b/internal/backend/remote-state/inmem/backend_test.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/backend" - statespkg "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" + statespkg "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" _ "github.com/hashicorp/terraform/internal/logging" ) diff --git a/internal/backend/remote-state/inmem/client.go b/internal/backend/remote-state/inmem/client.go index 21f229bda..5f404567f 100644 --- a/internal/backend/remote-state/inmem/client.go +++ b/internal/backend/remote-state/inmem/client.go @@ -3,8 +3,8 @@ package inmem import ( "crypto/md5" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // RemoteClient is a remote client that stores data in memory for testing. diff --git a/internal/backend/remote-state/inmem/client_test.go b/internal/backend/remote-state/inmem/client_test.go index e2cb8f520..a9fb56b6e 100644 --- a/internal/backend/remote-state/inmem/client_test.go +++ b/internal/backend/remote-state/inmem/client_test.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/kubernetes/backend_state.go b/internal/backend/remote-state/kubernetes/backend_state.go index 5d2390aa6..e99b4c1be 100644 --- a/internal/backend/remote-state/kubernetes/backend_state.go +++ b/internal/backend/remote-state/kubernetes/backend_state.go @@ -6,9 +6,9 @@ import ( "sort" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/internal/backend/remote-state/kubernetes/backend_test.go b/internal/backend/remote-state/kubernetes/backend_test.go index 616a78c98..7f0786c72 100644 --- a/internal/backend/remote-state/kubernetes/backend_test.go +++ b/internal/backend/remote-state/kubernetes/backend_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/internal/backend/remote-state/kubernetes/client.go b/internal/backend/remote-state/kubernetes/client.go index 3490f91b5..137450c06 100644 --- a/internal/backend/remote-state/kubernetes/client.go +++ b/internal/backend/remote-state/kubernetes/client.go @@ -10,8 +10,8 @@ import ( "fmt" "strings" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/internal/backend/remote-state/kubernetes/client_test.go b/internal/backend/remote-state/kubernetes/client_test.go index d2e94c6e6..08e615423 100644 --- a/internal/backend/remote-state/kubernetes/client_test.go +++ b/internal/backend/remote-state/kubernetes/client_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/manta/backend_state.go b/internal/backend/remote-state/manta/backend_state.go index 5c03bd7fa..925d82083 100644 --- a/internal/backend/remote-state/manta/backend_state.go +++ b/internal/backend/remote-state/manta/backend_state.go @@ -12,9 +12,9 @@ import ( "github.com/joyent/triton-go/storage" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func (b *Backend) Workspaces() ([]string, error) { diff --git a/internal/backend/remote-state/manta/client.go b/internal/backend/remote-state/manta/client.go index 3dba080a1..29d365951 100644 --- a/internal/backend/remote-state/manta/client.go +++ b/internal/backend/remote-state/manta/client.go @@ -10,8 +10,8 @@ import ( "path" uuid "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" tritonErrors "github.com/joyent/triton-go/errors" "github.com/joyent/triton-go/storage" ) diff --git a/internal/backend/remote-state/manta/client_test.go b/internal/backend/remote-state/manta/client_test.go index b17e5bef5..f5b9a516f 100644 --- a/internal/backend/remote-state/manta/client_test.go +++ b/internal/backend/remote-state/manta/client_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/oss/backend_state.go b/internal/backend/remote-state/oss/backend_state.go index f08df2465..d91ed6c5c 100644 --- a/internal/backend/remote-state/oss/backend_state.go +++ b/internal/backend/remote-state/oss/backend_state.go @@ -8,9 +8,9 @@ import ( "github.com/aliyun/aliyun-oss-go-sdk/oss" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "log" "path" diff --git a/internal/backend/remote-state/oss/client.go b/internal/backend/remote-state/oss/client.go index ba9052efa..ccf19576a 100644 --- a/internal/backend/remote-state/oss/client.go +++ b/internal/backend/remote-state/oss/client.go @@ -16,8 +16,8 @@ import ( "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" "github.com/hashicorp/go-multierror" uuid "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/pkg/errors" ) diff --git a/internal/backend/remote-state/oss/client_test.go b/internal/backend/remote-state/oss/client_test.go index ef7990f6f..1fc62792b 100644 --- a/internal/backend/remote-state/oss/client_test.go +++ b/internal/backend/remote-state/oss/client_test.go @@ -10,9 +10,9 @@ import ( "crypto/md5" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // NOTE: Before running this testcase, please create a OTS instance called 'tf-oss-remote' diff --git a/internal/backend/remote-state/pg/backend_state.go b/internal/backend/remote-state/pg/backend_state.go index 93f269bbc..2700c5196 100644 --- a/internal/backend/remote-state/pg/backend_state.go +++ b/internal/backend/remote-state/pg/backend_state.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func (b *Backend) Workspaces() ([]string, error) { diff --git a/internal/backend/remote-state/pg/backend_test.go b/internal/backend/remote-state/pg/backend_test.go index 774993d51..815adf54c 100644 --- a/internal/backend/remote-state/pg/backend_test.go +++ b/internal/backend/remote-state/pg/backend_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/lib/pq" _ "github.com/lib/pq" ) diff --git a/internal/backend/remote-state/pg/client.go b/internal/backend/remote-state/pg/client.go index 2c6db19f1..7ff9cd246 100644 --- a/internal/backend/remote-state/pg/client.go +++ b/internal/backend/remote-state/pg/client.go @@ -6,8 +6,8 @@ import ( "fmt" uuid "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" _ "github.com/lib/pq" ) diff --git a/internal/backend/remote-state/pg/client_test.go b/internal/backend/remote-state/pg/client_test.go index 5cd30d414..7bf21ac84 100644 --- a/internal/backend/remote-state/pg/client_test.go +++ b/internal/backend/remote-state/pg/client_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/s3/backend_state.go b/internal/backend/remote-state/s3/backend_state.go index 0514ad324..0134c861d 100644 --- a/internal/backend/remote-state/s3/backend_state.go +++ b/internal/backend/remote-state/s3/backend_state.go @@ -12,9 +12,9 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func (b *Backend) Workspaces() ([]string, error) { diff --git a/internal/backend/remote-state/s3/backend_test.go b/internal/backend/remote-state/s3/backend_test.go index 2a73cc930..a44f154c0 100644 --- a/internal/backend/remote-state/s3/backend_test.go +++ b/internal/backend/remote-state/s3/backend_test.go @@ -14,8 +14,8 @@ import ( awsbase "github.com/hashicorp/aws-sdk-go-base" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs/hcl2shim" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" ) var ( diff --git a/internal/backend/remote-state/s3/client.go b/internal/backend/remote-state/s3/client.go index e1624f04c..75e89a616 100644 --- a/internal/backend/remote-state/s3/client.go +++ b/internal/backend/remote-state/s3/client.go @@ -18,8 +18,8 @@ import ( "github.com/aws/aws-sdk-go/service/s3" multierror "github.com/hashicorp/go-multierror" uuid "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // Store the last saved serial in dynamo with this suffix for consistency checks. diff --git a/internal/backend/remote-state/s3/client_test.go b/internal/backend/remote-state/s3/client_test.go index 4e51ddc8c..abbd4257c 100644 --- a/internal/backend/remote-state/s3/client_test.go +++ b/internal/backend/remote-state/s3/client_test.go @@ -9,9 +9,9 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote-state/swift/backend_state.go b/internal/backend/remote-state/swift/backend_state.go index 6cc8c09cf..b853b64c9 100644 --- a/internal/backend/remote-state/swift/backend_state.go +++ b/internal/backend/remote-state/swift/backend_state.go @@ -5,9 +5,9 @@ import ( "strings" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/swift/client.go b/internal/backend/remote-state/swift/client.go index 184cef0ab..603554af2 100644 --- a/internal/backend/remote-state/swift/client.go +++ b/internal/backend/remote-state/swift/client.go @@ -14,8 +14,8 @@ import ( "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers" "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects" "github.com/gophercloud/gophercloud/pagination" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" ) const ( diff --git a/internal/backend/remote-state/swift/client_test.go b/internal/backend/remote-state/swift/client_test.go index 6d76bcee0..76fcf798e 100644 --- a/internal/backend/remote-state/swift/client_test.go +++ b/internal/backend/remote-state/swift/client_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states/remote" + "github.com/hashicorp/terraform/internal/states/remote" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote/backend.go b/internal/backend/remote/backend.go index aa1882632..574f15c09 100644 --- a/internal/backend/remote/backend.go +++ b/internal/backend/remote/backend.go @@ -18,9 +18,9 @@ import ( "github.com/hashicorp/terraform-svchost/disco" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" tfversion "github.com/hashicorp/terraform/version" "github.com/mitchellh/cli" diff --git a/internal/backend/remote/backend_apply_test.go b/internal/backend/remote/backend_apply_test.go index d18983447..9b38d1160 100644 --- a/internal/backend/remote/backend_apply_test.go +++ b/internal/backend/remote/backend_apply_test.go @@ -20,8 +20,8 @@ import ( "github.com/hashicorp/terraform/internal/initwd" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" tfversion "github.com/hashicorp/terraform/version" "github.com/mitchellh/cli" diff --git a/internal/backend/remote/backend_context.go b/internal/backend/remote/backend_context.go index d4a30caae..f84330f52 100644 --- a/internal/backend/remote/backend_context.go +++ b/internal/backend/remote/backend_context.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/remote/backend_context_test.go b/internal/backend/remote/backend_context_test.go index 16dbf2f95..c0470493f 100644 --- a/internal/backend/remote/backend_context_test.go +++ b/internal/backend/remote/backend_context_test.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/initwd" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states/statemgr" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/backend/remote/backend_plan_test.go b/internal/backend/remote/backend_plan_test.go index 8a7ad05ea..525eecb40 100644 --- a/internal/backend/remote/backend_plan_test.go +++ b/internal/backend/remote/backend_plan_test.go @@ -19,8 +19,8 @@ import ( "github.com/hashicorp/terraform/internal/initwd" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/mitchellh/cli" ) diff --git a/internal/backend/remote/backend_state.go b/internal/backend/remote/backend_state.go index 22b9563ec..ba4bda604 100644 --- a/internal/backend/remote/backend_state.go +++ b/internal/backend/remote/backend_state.go @@ -8,9 +8,9 @@ import ( "fmt" tfe "github.com/hashicorp/go-tfe" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) type remoteClient struct { diff --git a/internal/backend/remote/backend_state_test.go b/internal/backend/remote/backend_state_test.go index 5e3339537..3a1769c30 100644 --- a/internal/backend/remote/backend_state_test.go +++ b/internal/backend/remote/backend_state_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/hashicorp/terraform/internal/backend" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/remote" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/remote" + "github.com/hashicorp/terraform/internal/states/statefile" ) func TestRemoteClient_impl(t *testing.T) { diff --git a/internal/backend/remote/testing.go b/internal/backend/remote/testing.go index d71f80cbb..9a339bd20 100644 --- a/internal/backend/remote/testing.go +++ b/internal/backend/remote/testing.go @@ -18,8 +18,8 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/httpclient" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states/remote" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/remote" "github.com/hashicorp/terraform/terraform" "github.com/hashicorp/terraform/version" "github.com/mitchellh/cli" diff --git a/internal/backend/testing.go b/internal/backend/testing.go index dba46285a..00a9c684e 100644 --- a/internal/backend/testing.go +++ b/internal/backend/testing.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/hcl2shim" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" ) // TestBackendConfig validates and configures the backend with the diff --git a/internal/builtin/providers/terraform/data_source_state_test.go b/internal/builtin/providers/terraform/data_source_state_test.go index df35f0907..1a9f514ec 100644 --- a/internal/builtin/providers/terraform/data_source_state_test.go +++ b/internal/builtin/providers/terraform/data_source_state_test.go @@ -8,8 +8,8 @@ import ( "github.com/apparentlymart/go-dump/dump" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statemgr" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/apply_destroy_test.go b/internal/command/apply_destroy_test.go index 1bb1ef26d..f06ee6baa 100644 --- a/internal/command/apply_destroy_test.go +++ b/internal/command/apply_destroy_test.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" ) func TestApply_destroy(t *testing.T) { diff --git a/internal/command/apply_test.go b/internal/command/apply_test.go index 17f2f3197..005b3c545 100644 --- a/internal/command/apply_test.go +++ b/internal/command/apply_test.go @@ -25,9 +25,9 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" tfversion "github.com/hashicorp/terraform/version" ) diff --git a/internal/command/clistate/local_state.go b/internal/command/clistate/local_state.go index 42f921f14..7a0102c70 100644 --- a/internal/command/clistate/local_state.go +++ b/internal/command/clistate/local_state.go @@ -13,7 +13,7 @@ import ( multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/internal/legacy/terraform" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // LocalState manages a state storage that is local to the filesystem. diff --git a/internal/command/clistate/state.go b/internal/command/clistate/state.go index b99c085f9..a9946b6e6 100644 --- a/internal/command/clistate/state.go +++ b/internal/command/clistate/state.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/helper/slowmessage" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statemgr" ) const ( diff --git a/internal/command/clistate/state_test.go b/internal/command/clistate/state_test.go index c0bcef112..e0daecdd5 100644 --- a/internal/command/clistate/state_test.go +++ b/internal/command/clistate/state_test.go @@ -5,8 +5,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states/statemgr" ) func TestUnlock(t *testing.T) { diff --git a/internal/command/command_test.go b/internal/command/command_test.go index 30732ba29..a694309d6 100644 --- a/internal/command/command_test.go +++ b/internal/command/command_test.go @@ -36,10 +36,10 @@ import ( "github.com/hashicorp/terraform/internal/plans/planfile" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/registry" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/hashicorp/terraform/version" "github.com/zclconf/go-cty/cty" diff --git a/internal/command/format/diff.go b/internal/command/format/diff.go index 7e41c9df1..cc4af29b8 100644 --- a/internal/command/format/diff.go +++ b/internal/command/format/diff.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/objchange" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // ResourceChange returns a string representation of a change to a particular diff --git a/internal/command/format/diff_test.go b/internal/command/format/diff_test.go index 20aedbb8a..a11214830 100644 --- a/internal/command/format/diff_test.go +++ b/internal/command/format/diff_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/mitchellh/colorstring" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/format/state.go b/internal/command/format/state.go index 992ee3e84..958756702 100644 --- a/internal/command/format/state.go +++ b/internal/command/format/state.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" "github.com/mitchellh/colorstring" ) diff --git a/internal/command/format/state_test.go b/internal/command/format/state_test.go index e7772aefc..588824000 100644 --- a/internal/command/format/state_test.go +++ b/internal/command/format/state_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/graph_test.go b/internal/command/graph_test.go index b22815878..3fc2584cc 100644 --- a/internal/command/graph_test.go +++ b/internal/command/graph_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestGraph(t *testing.T) { diff --git a/internal/command/init.go b/internal/command/init.go index 1f2c4344b..d3ac02967 100644 --- a/internal/command/init.go +++ b/internal/command/init.go @@ -19,8 +19,8 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/getproviders" "github.com/hashicorp/terraform/internal/providercache" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" tfversion "github.com/hashicorp/terraform/version" ) diff --git a/internal/command/init_test.go b/internal/command/init_test.go index 62222ba46..a0a5e0b51 100644 --- a/internal/command/init_test.go +++ b/internal/command/init_test.go @@ -23,8 +23,8 @@ import ( "github.com/hashicorp/terraform/internal/depsfile" "github.com/hashicorp/terraform/internal/getproviders" "github.com/hashicorp/terraform/internal/providercache" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func TestInit_empty(t *testing.T) { diff --git a/internal/command/jsonplan/plan.go b/internal/command/jsonplan/plan.go index 8c826f618..ace8c260f 100644 --- a/internal/command/jsonplan/plan.go +++ b/internal/command/jsonplan/plan.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/terraform/internal/command/jsonstate" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/terraform" "github.com/hashicorp/terraform/version" ) diff --git a/internal/command/jsonstate/state.go b/internal/command/jsonstate/state.go index 04a14fc63..a7354699a 100644 --- a/internal/command/jsonstate/state.go +++ b/internal/command/jsonstate/state.go @@ -9,8 +9,8 @@ import ( ctyjson "github.com/zclconf/go-cty/cty/json" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/jsonstate/state_test.go b/internal/command/jsonstate/state_test.go index eac4a097b..5f915613b 100644 --- a/internal/command/jsonstate/state_test.go +++ b/internal/command/jsonstate/state_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/meta_backend.go b/internal/command/meta_backend.go index 930d693c5..49b45e5b1 100644 --- a/internal/command/meta_backend.go +++ b/internal/command/meta_backend.go @@ -22,8 +22,8 @@ import ( "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statemgr" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ctyjson "github.com/zclconf/go-cty/cty/json" diff --git a/internal/command/meta_backend_migrate.go b/internal/command/meta_backend_migrate.go index ed81f6c26..b924120b0 100644 --- a/internal/command/meta_backend_migrate.go +++ b/internal/command/meta_backend_migrate.go @@ -15,8 +15,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/meta_backend_test.go b/internal/command/meta_backend_test.go index 63e47a1ba..c489de088 100644 --- a/internal/command/meta_backend_test.go +++ b/internal/command/meta_backend_test.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/copy" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" diff --git a/internal/command/output.go b/internal/command/output.go index c84e3c3c3..3594fe33d 100644 --- a/internal/command/output.go +++ b/internal/command/output.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // OutputCommand is a Command implementation that reads an output diff --git a/internal/command/output_test.go b/internal/command/output_test.go index 00420a35c..d3d742c59 100644 --- a/internal/command/output_test.go +++ b/internal/command/output_test.go @@ -9,7 +9,7 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestOutput(t *testing.T) { diff --git a/internal/command/plan_test.go b/internal/command/plan_test.go index 14fd36fd1..11410cd0c 100644 --- a/internal/command/plan_test.go +++ b/internal/command/plan_test.go @@ -21,8 +21,8 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/refresh_test.go b/internal/command/refresh_test.go index 12e6b248c..72a71ef64 100644 --- a/internal/command/refresh_test.go +++ b/internal/command/refresh_test.go @@ -19,10 +19,10 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" ) var equateEmpty = cmpopts.EquateEmpty() diff --git a/internal/command/show.go b/internal/command/show.go index 644be8abe..7504a1973 100644 --- a/internal/command/show.go +++ b/internal/command/show.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" ) // ShowCommand is a Command implementation that reads and outputs the diff --git a/internal/command/show_test.go b/internal/command/show_test.go index 47daf73a6..d41009e84 100644 --- a/internal/command/show_test.go +++ b/internal/command/show_test.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" diff --git a/internal/command/state_list.go b/internal/command/state_list.go index a8c3385ad..ebd318bc8 100644 --- a/internal/command/state_list.go +++ b/internal/command/state_list.go @@ -5,8 +5,8 @@ import ( "strings" "github.com/hashicorp/terraform/internal/addrs" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/mitchellh/cli" ) diff --git a/internal/command/state_meta.go b/internal/command/state_meta.go index 494c10d0f..7fd7ce1bf 100644 --- a/internal/command/state_meta.go +++ b/internal/command/state_meta.go @@ -6,9 +6,9 @@ import ( "time" "github.com/hashicorp/terraform/internal/addrs" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" backendLocal "github.com/hashicorp/terraform/internal/backend/local" ) diff --git a/internal/command/state_mv.go b/internal/command/state_mv.go index eceb3aa96..2a0cd5d48 100644 --- a/internal/command/state_mv.go +++ b/internal/command/state_mv.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/mitchellh/cli" ) diff --git a/internal/command/state_mv_test.go b/internal/command/state_mv_test.go index 44bcaa40d..f9beefd1d 100644 --- a/internal/command/state_mv_test.go +++ b/internal/command/state_mv_test.go @@ -12,7 +12,7 @@ import ( "github.com/mitchellh/colorstring" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) var disabledColorize = &colorstring.Colorize{ diff --git a/internal/command/state_pull.go b/internal/command/state_pull.go index 503e5de16..0616df2d4 100644 --- a/internal/command/state_pull.go +++ b/internal/command/state_pull.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // StatePullCommand is a Command implementation that shows a single resource. diff --git a/internal/command/state_push.go b/internal/command/state_push.go index 2846fd31b..117611e94 100644 --- a/internal/command/state_push.go +++ b/internal/command/state_push.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/mitchellh/cli" ) diff --git a/internal/command/state_push_test.go b/internal/command/state_push_test.go index 7c4d30e85..db708c8a4 100644 --- a/internal/command/state_push_test.go +++ b/internal/command/state_push_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/backend/remote-state/inmem" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/mitchellh/cli" ) diff --git a/internal/command/state_replace_provider.go b/internal/command/state_replace_provider.go index 76c978233..c6c47e669 100644 --- a/internal/command/state_replace_provider.go +++ b/internal/command/state_replace_provider.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/mitchellh/cli" ) diff --git a/internal/command/state_replace_provider_test.go b/internal/command/state_replace_provider_test.go index ca2cf056d..7ac5f42c4 100644 --- a/internal/command/state_replace_provider_test.go +++ b/internal/command/state_replace_provider_test.go @@ -9,7 +9,7 @@ import ( "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestStateReplaceProvider(t *testing.T) { diff --git a/internal/command/state_rm_test.go b/internal/command/state_rm_test.go index d3a593f88..a3e954c43 100644 --- a/internal/command/state_rm_test.go +++ b/internal/command/state_rm_test.go @@ -9,7 +9,7 @@ import ( "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestStateRm(t *testing.T) { diff --git a/internal/command/state_show.go b/internal/command/state_show.go index a8188c09f..073548a09 100644 --- a/internal/command/state_show.go +++ b/internal/command/state_show.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/command/format" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/mitchellh/cli" ) diff --git a/internal/command/state_show_test.go b/internal/command/state_show_test.go index 0016c8fb0..32e4178b8 100644 --- a/internal/command/state_show_test.go +++ b/internal/command/state_show_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/state_test.go b/internal/command/state_test.go index 49762075e..cbacb6c63 100644 --- a/internal/command/state_test.go +++ b/internal/command/state_test.go @@ -6,7 +6,7 @@ import ( "sort" "testing" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // testStateBackups returns the list of backups in order of creation diff --git a/internal/command/taint.go b/internal/command/taint.go index e73aed95c..3d213d2b1 100644 --- a/internal/command/taint.go +++ b/internal/command/taint.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/taint_test.go b/internal/command/taint_test.go index 93ed731c2..57c626e97 100644 --- a/internal/command/taint_test.go +++ b/internal/command/taint_test.go @@ -9,7 +9,7 @@ import ( "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestTaint(t *testing.T) { diff --git a/internal/command/test.go b/internal/command/test.go index 6f01e39b1..eac152d13 100644 --- a/internal/command/test.go +++ b/internal/command/test.go @@ -23,8 +23,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providercache" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/testdata/statelocker.go b/internal/command/testdata/statelocker.go index 15d4eb871..a31708605 100644 --- a/internal/command/testdata/statelocker.go +++ b/internal/command/testdata/statelocker.go @@ -12,7 +12,7 @@ import ( "time" "github.com/hashicorp/terraform/internal/command/clistate" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" ) func main() { diff --git a/internal/command/unlock.go b/internal/command/unlock.go index 3dbd0e25e..d4e7dfea3 100644 --- a/internal/command/unlock.go +++ b/internal/command/unlock.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/tfdiags" "github.com/hashicorp/terraform/terraform" diff --git a/internal/command/untaint.go b/internal/command/untaint.go index 319e0f02c..98f203560 100644 --- a/internal/command/untaint.go +++ b/internal/command/untaint.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // UntaintCommand is a cli.Command implementation that manually untaints diff --git a/internal/command/untaint_test.go b/internal/command/untaint_test.go index fbcac53d1..4b84e5b0d 100644 --- a/internal/command/untaint_test.go +++ b/internal/command/untaint_test.go @@ -7,7 +7,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/mitchellh/cli" ) diff --git a/internal/command/views/apply.go b/internal/command/views/apply.go index 41797d082..3bd502bac 100644 --- a/internal/command/views/apply.go +++ b/internal/command/views/apply.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/format" "github.com/hashicorp/terraform/internal/command/views/json" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/apply_test.go b/internal/command/views/apply_test.go index 0c64ca6ba..d7cf7d5c5 100644 --- a/internal/command/views/apply_test.go +++ b/internal/command/views/apply_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/hashicorp/terraform/internal/command/arguments" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/views/hook_count.go b/internal/command/views/hook_count.go index fc2a51651..47b596f16 100644 --- a/internal/command/views/hook_count.go +++ b/internal/command/views/hook_count.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/hook_count_test.go b/internal/command/views/hook_count_test.go index 3b195b9b4..c679726dc 100644 --- a/internal/command/views/hook_count_test.go +++ b/internal/command/views/hook_count_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" legacy "github.com/hashicorp/terraform/internal/legacy/terraform" diff --git a/internal/command/views/hook_json.go b/internal/command/views/hook_json.go index db3bf6f8a..f0ca5b254 100644 --- a/internal/command/views/hook_json.go +++ b/internal/command/views/hook_json.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/internal/command/format" "github.com/hashicorp/terraform/internal/command/views/json" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/views/hook_json_test.go b/internal/command/views/hook_json_test.go index 2748dc25b..64fd86ca3 100644 --- a/internal/command/views/hook_json_test.go +++ b/internal/command/views/hook_json_test.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/views/hook_ui.go b/internal/command/views/hook_ui.go index 90f034e74..3804038d9 100644 --- a/internal/command/views/hook_ui.go +++ b/internal/command/views/hook_ui.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform/internal/command/format" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/hook_ui_test.go b/internal/command/views/hook_ui_test.go index 7cbfc5529..1012c65a5 100644 --- a/internal/command/views/hook_ui_test.go +++ b/internal/command/views/hook_ui_test.go @@ -14,8 +14,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/json/output.go b/internal/command/views/json/output.go index be49260c9..5c9334917 100644 --- a/internal/command/views/json/output.go +++ b/internal/command/views/json/output.go @@ -6,8 +6,8 @@ import ( ctyjson "github.com/zclconf/go-cty/cty/json" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) type Output struct { diff --git a/internal/command/views/json/output_test.go b/internal/command/views/json/output_test.go index 4babfa2c5..d368487c3 100644 --- a/internal/command/views/json/output_test.go +++ b/internal/command/views/json/output_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/views/operation.go b/internal/command/views/operation.go index 5a030bd2e..f9ec700b8 100644 --- a/internal/command/views/operation.go +++ b/internal/command/views/operation.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform/internal/command/format" "github.com/hashicorp/terraform/internal/command/views/json" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statefile" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/operation_test.go b/internal/command/views/operation_test.go index 07fc92840..b20ffbd68 100644 --- a/internal/command/views/operation_test.go +++ b/internal/command/views/operation_test.go @@ -9,9 +9,9 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/output.go b/internal/command/views/output.go index 6ca2fefb2..98686c664 100644 --- a/internal/command/views/output.go +++ b/internal/command/views/output.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/repl" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // The Output view renders either one or all outputs, depending on whether or diff --git a/internal/command/views/output_test.go b/internal/command/views/output_test.go index a77a3b7b9..3307778e6 100644 --- a/internal/command/views/output_test.go +++ b/internal/command/views/output_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform/internal/command/arguments" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/views/plan.go b/internal/command/views/plan.go index c049896ff..845a656d4 100644 --- a/internal/command/views/plan.go +++ b/internal/command/views/plan.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/format" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/refresh.go b/internal/command/views/refresh.go index ea5790dad..44220ad9e 100644 --- a/internal/command/views/refresh.go +++ b/internal/command/views/refresh.go @@ -5,8 +5,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/views/json" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/terraform" ) diff --git a/internal/command/views/refresh_test.go b/internal/command/views/refresh_test.go index b1456e46d..5dbcdc0e2 100644 --- a/internal/command/views/refresh_test.go +++ b/internal/command/views/refresh_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform/internal/command/arguments" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terminal" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/workspace_command_test.go b/internal/command/workspace_command_test.go index 3482371e5..92a87c504 100644 --- a/internal/command/workspace_command_test.go +++ b/internal/command/workspace_command_test.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/backend/local" "github.com/hashicorp/terraform/internal/backend/remote-state/inmem" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/mitchellh/cli" legacy "github.com/hashicorp/terraform/internal/legacy/terraform" diff --git a/internal/command/workspace_new.go b/internal/command/workspace_new.go index c8483c915..1d7b2898c 100644 --- a/internal/command/workspace_new.go +++ b/internal/command/workspace_new.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statefile" "github.com/mitchellh/cli" "github.com/posener/complete" ) diff --git a/internal/e2e/e2e.go b/internal/e2e/e2e.go index 69f9e2e7d..e07f2e87d 100644 --- a/internal/e2e/e2e.go +++ b/internal/e2e/e2e.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/planfile" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" ) // Type binary represents the combination of a compiled binary diff --git a/internal/legacy/terraform/schemas.go b/internal/legacy/terraform/schemas.go index 9216707a5..20b77ea97 100644 --- a/internal/legacy/terraform/schemas.go +++ b/internal/legacy/terraform/schemas.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // Schemas is a container for various kinds of schema that Terraform needs diff --git a/internal/plans/changes.go b/internal/plans/changes.go index 9575f2d6b..bcab96ed6 100644 --- a/internal/plans/changes.go +++ b/internal/plans/changes.go @@ -2,7 +2,7 @@ package plans import ( "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/plans/changes_src.go b/internal/plans/changes_src.go index 1dcd04960..b254f1760 100644 --- a/internal/plans/changes_src.go +++ b/internal/plans/changes_src.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/plans/changes_state.go b/internal/plans/changes_state.go index 543e6c2bd..8446e9be6 100644 --- a/internal/plans/changes_state.go +++ b/internal/plans/changes_state.go @@ -1,7 +1,7 @@ package plans import ( - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // PlannedState merges the set of changes described by the receiver into the diff --git a/internal/plans/changes_sync.go b/internal/plans/changes_sync.go index b175b467e..739e91994 100644 --- a/internal/plans/changes_sync.go +++ b/internal/plans/changes_sync.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // ChangesSync is a wrapper around a Changes that provides a concurrency-safe diff --git a/internal/plans/plan.go b/internal/plans/plan.go index f2d4f11dd..68e60ad98 100644 --- a/internal/plans/plan.go +++ b/internal/plans/plan.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/plans/planfile/planfile_test.go b/internal/plans/planfile/planfile_test.go index 192e16dbb..b0001312d 100644 --- a/internal/plans/planfile/planfile_test.go +++ b/internal/plans/planfile/planfile_test.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/configs/configload" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" tfversion "github.com/hashicorp/terraform/version" ) diff --git a/internal/plans/planfile/reader.go b/internal/plans/planfile/reader.go index ff275d3cb..7175eda27 100644 --- a/internal/plans/planfile/reader.go +++ b/internal/plans/planfile/reader.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configload" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states/statefile" ) const tfstateFilename = "tfstate" diff --git a/internal/plans/planfile/tfplan.go b/internal/plans/planfile/tfplan.go index bf1b4c67a..930ee4908 100644 --- a/internal/plans/planfile/tfplan.go +++ b/internal/plans/planfile/tfplan.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/internal/planproto" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/version" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/plans/planfile/writer.go b/internal/plans/planfile/writer.go index ea4d86175..358c4d785 100644 --- a/internal/plans/planfile/writer.go +++ b/internal/plans/planfile/writer.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configload" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states/statefile" ) // Create creates a new plan file with the given filename, overwriting any diff --git a/internal/providers/provider.go b/internal/providers/provider.go index e0ab30929..8d3914f00 100644 --- a/internal/providers/provider.go +++ b/internal/providers/provider.go @@ -4,8 +4,8 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/configs/configschema" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // Interface represents the set of methods required for a complete resource diff --git a/internal/repl/session_test.go b/internal/repl/session_test.go index 2154ef051..30f931bf3 100644 --- a/internal/repl/session_test.go +++ b/internal/repl/session_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/initwd" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/terraform" _ "github.com/hashicorp/terraform/internal/logging" diff --git a/states/doc.go b/internal/states/doc.go similarity index 100% rename from states/doc.go rename to internal/states/doc.go diff --git a/states/instance_generation.go b/internal/states/instance_generation.go similarity index 100% rename from states/instance_generation.go rename to internal/states/instance_generation.go diff --git a/states/instance_object.go b/internal/states/instance_object.go similarity index 100% rename from states/instance_object.go rename to internal/states/instance_object.go diff --git a/states/instance_object_src.go b/internal/states/instance_object_src.go similarity index 100% rename from states/instance_object_src.go rename to internal/states/instance_object_src.go diff --git a/states/module.go b/internal/states/module.go similarity index 100% rename from states/module.go rename to internal/states/module.go diff --git a/states/objectstatus_string.go b/internal/states/objectstatus_string.go similarity index 100% rename from states/objectstatus_string.go rename to internal/states/objectstatus_string.go diff --git a/states/output_value.go b/internal/states/output_value.go similarity index 100% rename from states/output_value.go rename to internal/states/output_value.go diff --git a/states/remote/remote.go b/internal/states/remote/remote.go similarity index 94% rename from states/remote/remote.go rename to internal/states/remote/remote.go index 0dab1863c..a87c9145a 100644 --- a/states/remote/remote.go +++ b/internal/states/remote/remote.go @@ -1,7 +1,7 @@ package remote import ( - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // Client is the interface that must be implemented for a remote state diff --git a/states/remote/remote_test.go b/internal/states/remote/remote_test.go similarity index 100% rename from states/remote/remote_test.go rename to internal/states/remote/remote_test.go diff --git a/states/remote/state.go b/internal/states/remote/state.go similarity index 97% rename from states/remote/state.go rename to internal/states/remote/state.go index f4abd3fc8..ca939a96a 100644 --- a/states/remote/state.go +++ b/internal/states/remote/state.go @@ -6,9 +6,9 @@ import ( "sync" uuid "github.com/hashicorp/go-uuid" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // State implements the State interfaces in the state package to handle diff --git a/states/remote/state_test.go b/internal/states/remote/state_test.go similarity index 99% rename from states/remote/state_test.go rename to internal/states/remote/state_test.go index fb50651b0..c38e0bfec 100644 --- a/states/remote/state_test.go +++ b/internal/states/remote/state_test.go @@ -8,9 +8,9 @@ import ( "github.com/google/go-cmp/cmp" "github.com/zclconf/go-cty/cty" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/version" ) diff --git a/states/remote/testing.go b/internal/states/remote/testing.go similarity index 94% rename from states/remote/testing.go rename to internal/states/remote/testing.go index 7d69d9a41..e14da1cbd 100644 --- a/states/remote/testing.go +++ b/internal/states/remote/testing.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" - "github.com/hashicorp/terraform/states/statefile" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statefile" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // TestClient is a generic function to test any client. diff --git a/states/resource.go b/internal/states/resource.go similarity index 100% rename from states/resource.go rename to internal/states/resource.go diff --git a/states/resource_test.go b/internal/states/resource_test.go similarity index 100% rename from states/resource_test.go rename to internal/states/resource_test.go diff --git a/states/state.go b/internal/states/state.go similarity index 100% rename from states/state.go rename to internal/states/state.go diff --git a/states/state_deepcopy.go b/internal/states/state_deepcopy.go similarity index 100% rename from states/state_deepcopy.go rename to internal/states/state_deepcopy.go diff --git a/states/state_equal.go b/internal/states/state_equal.go similarity index 100% rename from states/state_equal.go rename to internal/states/state_equal.go diff --git a/states/state_string.go b/internal/states/state_string.go similarity index 100% rename from states/state_string.go rename to internal/states/state_string.go diff --git a/states/state_test.go b/internal/states/state_test.go similarity index 100% rename from states/state_test.go rename to internal/states/state_test.go diff --git a/states/statefile/diagnostics.go b/internal/states/statefile/diagnostics.go similarity index 100% rename from states/statefile/diagnostics.go rename to internal/states/statefile/diagnostics.go diff --git a/states/statefile/doc.go b/internal/states/statefile/doc.go similarity index 100% rename from states/statefile/doc.go rename to internal/states/statefile/doc.go diff --git a/states/statefile/file.go b/internal/states/statefile/file.go similarity index 97% rename from states/statefile/file.go rename to internal/states/statefile/file.go index 6e2024019..631807b11 100644 --- a/states/statefile/file.go +++ b/internal/states/statefile/file.go @@ -3,7 +3,7 @@ package statefile import ( version "github.com/hashicorp/go-version" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" tfversion "github.com/hashicorp/terraform/version" ) diff --git a/states/statefile/marshal_equal.go b/internal/states/statefile/marshal_equal.go similarity index 95% rename from states/statefile/marshal_equal.go rename to internal/states/statefile/marshal_equal.go index 4948b39b9..2b386cbb7 100644 --- a/states/statefile/marshal_equal.go +++ b/internal/states/statefile/marshal_equal.go @@ -3,7 +3,7 @@ package statefile import ( "bytes" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // StatesMarshalEqual returns true if and only if the two given states have diff --git a/states/statefile/read.go b/internal/states/statefile/read.go similarity index 100% rename from states/statefile/read.go rename to internal/states/statefile/read.go diff --git a/states/statefile/roundtrip_test.go b/internal/states/statefile/roundtrip_test.go similarity index 100% rename from states/statefile/roundtrip_test.go rename to internal/states/statefile/roundtrip_test.go diff --git a/states/statefile/testdata/roundtrip/v1-simple.in.tfstate b/internal/states/statefile/testdata/roundtrip/v1-simple.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v1-simple.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v1-simple.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v1-simple.out.tfstate b/internal/states/statefile/testdata/roundtrip/v1-simple.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v1-simple.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v1-simple.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-bigint.in.tfstate b/internal/states/statefile/testdata/roundtrip/v3-bigint.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-bigint.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-bigint.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-bigint.out.tfstate b/internal/states/statefile/testdata/roundtrip/v3-bigint.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-bigint.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-bigint.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-builtin.in.tfstate b/internal/states/statefile/testdata/roundtrip/v3-builtin.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-builtin.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-builtin.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-builtin.out.tfstate b/internal/states/statefile/testdata/roundtrip/v3-builtin.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-builtin.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-builtin.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-grabbag.in.tfstate b/internal/states/statefile/testdata/roundtrip/v3-grabbag.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-grabbag.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-grabbag.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-grabbag.out.tfstate b/internal/states/statefile/testdata/roundtrip/v3-grabbag.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-grabbag.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-grabbag.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-invalid-depends.in.tfstate b/internal/states/statefile/testdata/roundtrip/v3-invalid-depends.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-invalid-depends.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-invalid-depends.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-invalid-depends.out.tfstate b/internal/states/statefile/testdata/roundtrip/v3-invalid-depends.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-invalid-depends.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-invalid-depends.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-simple.in.tfstate b/internal/states/statefile/testdata/roundtrip/v3-simple.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-simple.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-simple.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v3-simple.out.tfstate b/internal/states/statefile/testdata/roundtrip/v3-simple.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v3-simple.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v3-simple.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-cbd.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-cbd.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-cbd.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-cbd.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-cbd.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-cbd.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-cbd.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-cbd.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-foreach.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-foreach.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-foreach.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-foreach.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-foreach.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-foreach.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-foreach.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-foreach.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-future.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-future.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-future.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-future.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-future.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-future.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-future.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-future.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-legacy-foreach.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-legacy-foreach.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-legacy-foreach.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-legacy-foreach.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-legacy-foreach.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-legacy-foreach.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-legacy-foreach.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-legacy-foreach.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-legacy-modules.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-legacy-modules.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-legacy-modules.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-legacy-modules.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-legacy-modules.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-legacy-modules.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-legacy-modules.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-legacy-modules.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-legacy-simple.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-legacy-simple.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-legacy-simple.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-legacy-simple.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-legacy-simple.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-legacy-simple.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-legacy-simple.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-legacy-simple.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-modules.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-modules.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-modules.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-modules.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-modules.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-modules.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-modules.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-modules.out.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-simple.in.tfstate b/internal/states/statefile/testdata/roundtrip/v4-simple.in.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-simple.in.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-simple.in.tfstate diff --git a/states/statefile/testdata/roundtrip/v4-simple.out.tfstate b/internal/states/statefile/testdata/roundtrip/v4-simple.out.tfstate similarity index 100% rename from states/statefile/testdata/roundtrip/v4-simple.out.tfstate rename to internal/states/statefile/testdata/roundtrip/v4-simple.out.tfstate diff --git a/states/statefile/version0.go b/internal/states/statefile/version0.go similarity index 100% rename from states/statefile/version0.go rename to internal/states/statefile/version0.go diff --git a/states/statefile/version1.go b/internal/states/statefile/version1.go similarity index 100% rename from states/statefile/version1.go rename to internal/states/statefile/version1.go diff --git a/states/statefile/version1_upgrade.go b/internal/states/statefile/version1_upgrade.go similarity index 100% rename from states/statefile/version1_upgrade.go rename to internal/states/statefile/version1_upgrade.go diff --git a/states/statefile/version2.go b/internal/states/statefile/version2.go similarity index 100% rename from states/statefile/version2.go rename to internal/states/statefile/version2.go diff --git a/states/statefile/version2_upgrade.go b/internal/states/statefile/version2_upgrade.go similarity index 100% rename from states/statefile/version2_upgrade.go rename to internal/states/statefile/version2_upgrade.go diff --git a/states/statefile/version3.go b/internal/states/statefile/version3.go similarity index 100% rename from states/statefile/version3.go rename to internal/states/statefile/version3.go diff --git a/states/statefile/version3_upgrade.go b/internal/states/statefile/version3_upgrade.go similarity index 99% rename from states/statefile/version3_upgrade.go rename to internal/states/statefile/version3_upgrade.go index 6ac19f513..f46430af3 100644 --- a/states/statefile/version3_upgrade.go +++ b/internal/states/statefile/version3_upgrade.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) func upgradeStateV3ToV4(old *stateV3) (*stateV4, error) { diff --git a/states/statefile/version4.go b/internal/states/statefile/version4.go similarity index 99% rename from states/statefile/version4.go rename to internal/states/statefile/version4.go index 6356e3c9b..ca1c555e2 100644 --- a/states/statefile/version4.go +++ b/internal/states/statefile/version4.go @@ -11,8 +11,8 @@ import ( ctyjson "github.com/zclconf/go-cty/cty/json" "github.com/hashicorp/terraform/internal/addrs" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) func readStateV4(src []byte) (*File, tfdiags.Diagnostics) { diff --git a/states/statefile/version4_test.go b/internal/states/statefile/version4_test.go similarity index 100% rename from states/statefile/version4_test.go rename to internal/states/statefile/version4_test.go diff --git a/states/statefile/write.go b/internal/states/statefile/write.go similarity index 100% rename from states/statefile/write.go rename to internal/states/statefile/write.go diff --git a/states/statemgr/doc.go b/internal/states/statemgr/doc.go similarity index 100% rename from states/statemgr/doc.go rename to internal/states/statemgr/doc.go diff --git a/states/statemgr/filesystem.go b/internal/states/statemgr/filesystem.go similarity index 99% rename from states/statemgr/filesystem.go rename to internal/states/statemgr/filesystem.go index 737829161..7cd19e8b0 100644 --- a/states/statemgr/filesystem.go +++ b/internal/states/statemgr/filesystem.go @@ -14,8 +14,8 @@ import ( multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" ) // Filesystem is a full state manager that uses a file in the local filesystem diff --git a/states/statemgr/filesystem_lock_unix.go b/internal/states/statemgr/filesystem_lock_unix.go similarity index 100% rename from states/statemgr/filesystem_lock_unix.go rename to internal/states/statemgr/filesystem_lock_unix.go diff --git a/states/statemgr/filesystem_lock_windows.go b/internal/states/statemgr/filesystem_lock_windows.go similarity index 100% rename from states/statemgr/filesystem_lock_windows.go rename to internal/states/statemgr/filesystem_lock_windows.go diff --git a/states/statemgr/filesystem_test.go b/internal/states/statemgr/filesystem_test.go similarity index 98% rename from states/statemgr/filesystem_test.go rename to internal/states/statemgr/filesystem_test.go index d20e685cd..5a73819d6 100644 --- a/states/statemgr/filesystem_test.go +++ b/internal/states/statemgr/filesystem_test.go @@ -14,8 +14,8 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" tfversion "github.com/hashicorp/terraform/version" ) diff --git a/states/statemgr/helper.go b/internal/states/statemgr/helper.go similarity index 93% rename from states/statemgr/helper.go rename to internal/states/statemgr/helper.go index 7eef70efc..a019b2c43 100644 --- a/states/statemgr/helper.go +++ b/internal/states/statemgr/helper.go @@ -4,8 +4,8 @@ package statemgr // operations done against full state managers. import ( - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/version" ) diff --git a/states/statemgr/lineage.go b/internal/states/statemgr/lineage.go similarity index 100% rename from states/statemgr/lineage.go rename to internal/states/statemgr/lineage.go diff --git a/states/statemgr/lock.go b/internal/states/statemgr/lock.go similarity index 93% rename from states/statemgr/lock.go rename to internal/states/statemgr/lock.go index b64f76503..190e06ea7 100644 --- a/states/statemgr/lock.go +++ b/internal/states/statemgr/lock.go @@ -1,6 +1,6 @@ package statemgr -import "github.com/hashicorp/terraform/states" +import "github.com/hashicorp/terraform/internal/states" // LockDisabled implements State and Locker but disables state locking. // If State doesn't support locking, this is a no-op. This is useful for diff --git a/states/statemgr/lock_test.go b/internal/states/statemgr/lock_test.go similarity index 100% rename from states/statemgr/lock_test.go rename to internal/states/statemgr/lock_test.go diff --git a/states/statemgr/locker.go b/internal/states/statemgr/locker.go similarity index 100% rename from states/statemgr/locker.go rename to internal/states/statemgr/locker.go diff --git a/states/statemgr/migrate.go b/internal/states/statemgr/migrate.go similarity index 99% rename from states/statemgr/migrate.go rename to internal/states/statemgr/migrate.go index 9b55fe9a7..099e26a88 100644 --- a/states/statemgr/migrate.go +++ b/internal/states/statemgr/migrate.go @@ -3,7 +3,7 @@ package statemgr import ( "fmt" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states/statefile" ) // Migrator is an optional interface implemented by state managers that diff --git a/states/statemgr/migrate_test.go b/internal/states/statemgr/migrate_test.go similarity index 96% rename from states/statemgr/migrate_test.go rename to internal/states/statemgr/migrate_test.go index 6e52bf484..e9269a177 100644 --- a/states/statemgr/migrate_test.go +++ b/internal/states/statemgr/migrate_test.go @@ -6,8 +6,8 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" ) func TestCheckValidImport(t *testing.T) { diff --git a/states/statemgr/persistent.go b/internal/states/statemgr/persistent.go similarity index 100% rename from states/statemgr/persistent.go rename to internal/states/statemgr/persistent.go diff --git a/states/statemgr/plan.go b/internal/states/statemgr/plan.go similarity index 96% rename from states/statemgr/plan.go rename to internal/states/statemgr/plan.go index b5036030a..fb42df312 100644 --- a/states/statemgr/plan.go +++ b/internal/states/statemgr/plan.go @@ -3,8 +3,8 @@ package statemgr import ( "fmt" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" ) // PlannedStateUpdate is a special helper to obtain a statefile representation diff --git a/states/statemgr/snapshotmetarel_string.go b/internal/states/statemgr/snapshotmetarel_string.go similarity index 100% rename from states/statemgr/snapshotmetarel_string.go rename to internal/states/statemgr/snapshotmetarel_string.go diff --git a/states/statemgr/statemgr.go b/internal/states/statemgr/statemgr.go similarity index 100% rename from states/statemgr/statemgr.go rename to internal/states/statemgr/statemgr.go diff --git a/states/statemgr/statemgr_fake.go b/internal/states/statemgr/statemgr_fake.go similarity index 98% rename from states/statemgr/statemgr_fake.go rename to internal/states/statemgr/statemgr_fake.go index 36de10865..a547c1bc7 100644 --- a/states/statemgr/statemgr_fake.go +++ b/internal/states/statemgr/statemgr_fake.go @@ -4,7 +4,7 @@ import ( "errors" "sync" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // NewFullFake returns a full state manager that really only supports transient diff --git a/states/statemgr/statemgr_test.go b/internal/states/statemgr/statemgr_test.go similarity index 100% rename from states/statemgr/statemgr_test.go rename to internal/states/statemgr/statemgr_test.go diff --git a/states/statemgr/testdata/lockstate.go b/internal/states/statemgr/testdata/lockstate.go similarity index 88% rename from states/statemgr/testdata/lockstate.go rename to internal/states/statemgr/testdata/lockstate.go index f0b336068..a353900cf 100644 --- a/states/statemgr/testdata/lockstate.go +++ b/internal/states/statemgr/testdata/lockstate.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/hashicorp/terraform/states/statemgr" + "github.com/hashicorp/terraform/internal/states/statemgr" ) // Attempt to open and lock a terraform state file. diff --git a/states/statemgr/testing.go b/internal/states/statemgr/testing.go similarity index 97% rename from states/statemgr/testing.go rename to internal/states/statemgr/testing.go index 5c0b24870..82cecc0de 100644 --- a/states/statemgr/testing.go +++ b/internal/states/statemgr/testing.go @@ -8,8 +8,8 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" ) // TestFull is a helper for testing full state manager implementations. It diff --git a/states/statemgr/transient.go b/internal/states/statemgr/transient.go similarity index 98% rename from states/statemgr/transient.go rename to internal/states/statemgr/transient.go index 087fd2785..0ac9b1ded 100644 --- a/states/statemgr/transient.go +++ b/internal/states/statemgr/transient.go @@ -1,6 +1,6 @@ package statemgr -import "github.com/hashicorp/terraform/states" +import "github.com/hashicorp/terraform/internal/states" // Transient is a union of the Reader and Writer interfaces, for types that // deal with transient snapshots. diff --git a/states/statemgr/transient_inmem.go b/internal/states/statemgr/transient_inmem.go similarity index 94% rename from states/statemgr/transient_inmem.go rename to internal/states/statemgr/transient_inmem.go index 07fd3726f..4692225cb 100644 --- a/states/statemgr/transient_inmem.go +++ b/internal/states/statemgr/transient_inmem.go @@ -3,7 +3,7 @@ package statemgr import ( "sync" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // NewTransientInMemory returns a Transient implementation that retains diff --git a/states/sync.go b/internal/states/sync.go similarity index 100% rename from states/sync.go rename to internal/states/sync.go diff --git a/terraform/context.go b/terraform/context.go index 85a8188de..c0934d778 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -15,8 +15,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/depsfile" diff --git a/terraform/context_apply2_test.go b/terraform/context_apply2_test.go index 0a3606ab1..45cd48f84 100644 --- a/terraform/context_apply2_test.go +++ b/terraform/context_apply2_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 8790a2c72..4123c6381 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -25,8 +25,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/gocty" ) diff --git a/terraform/context_import.go b/terraform/context_import.go index 0f37bc59b..32ac6e0d3 100644 --- a/terraform/context_import.go +++ b/terraform/context_import.go @@ -2,8 +2,8 @@ package terraform import ( "github.com/hashicorp/terraform/internal/addrs" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // ImportOpts are used as the configuration for Import. diff --git a/terraform/context_import_test.go b/terraform/context_import_test.go index 11209e9c9..5a645c7e5 100644 --- a/terraform/context_import_test.go +++ b/terraform/context_import_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/context_input_test.go b/terraform/context_input_test.go index d673e48c5..92aaaccb1 100644 --- a/terraform/context_input_test.go +++ b/terraform/context_input_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestContext2Input_provider(t *testing.T) { diff --git a/terraform/context_plan2_test.go b/terraform/context_plan2_test.go index 8a4852043..48516fc78 100644 --- a/terraform/context_plan2_test.go +++ b/terraform/context_plan2_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/context_plan_test.go b/terraform/context_plan_test.go index 55bad4574..3a1989dc2 100644 --- a/terraform/context_plan_test.go +++ b/terraform/context_plan_test.go @@ -21,8 +21,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) func TestContext2Plan_basic(t *testing.T) { diff --git a/terraform/context_refresh_test.go b/terraform/context_refresh_test.go index 4b15435fe..7f58f1a0a 100644 --- a/terraform/context_refresh_test.go +++ b/terraform/context_refresh_test.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/configs/hcl2shim" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestContext2Refresh(t *testing.T) { diff --git a/terraform/context_test.go b/terraform/context_test.go index 080df0106..f7107922c 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -25,9 +25,9 @@ import ( "github.com/hashicorp/terraform/internal/plans/planfile" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" + "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" - "github.com/hashicorp/terraform/states/statefile" tfversion "github.com/hashicorp/terraform/version" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/context_validate_test.go b/terraform/context_validate_test.go index 3386e9ca4..cae189482 100644 --- a/terraform/context_validate_test.go +++ b/terraform/context_validate_test.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) func TestContext2Validate_badCount(t *testing.T) { diff --git a/terraform/eval_context.go b/terraform/eval_context.go index 8a0666dd5..0a711f873 100644 --- a/terraform/eval_context.go +++ b/terraform/eval_context.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "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 8e17e7274..4e956b8de 100644 --- a/terraform/eval_context_builtin.go +++ b/terraform/eval_context_builtin.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform/internal/provisioners" "github.com/hashicorp/terraform/version" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/configs/configschema" diff --git a/terraform/eval_context_mock.go b/terraform/eval_context_mock.go index a759cb64e..7d2e64c6a 100644 --- a/terraform/eval_context_mock.go +++ b/terraform/eval_context_mock.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/terraform/evaluate.go b/terraform/evaluate.go index 88b3b3563..1ca406bec 100644 --- a/terraform/evaluate.go +++ b/terraform/evaluate.go @@ -18,8 +18,8 @@ import ( "github.com/hashicorp/terraform/internal/instances" "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // Evaluator provides the necessary contextual data for evaluating expressions diff --git a/terraform/evaluate_test.go b/terraform/evaluate_test.go index 428cc6199..eb1f37fda 100644 --- a/terraform/evaluate_test.go +++ b/terraform/evaluate_test.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) func TestEvaluatorGetTerraformAttr(t *testing.T) { diff --git a/terraform/graph_builder_apply.go b/terraform/graph_builder_apply.go index 584c8cf84..683353cf9 100644 --- a/terraform/graph_builder_apply.go +++ b/terraform/graph_builder_apply.go @@ -5,8 +5,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // ApplyGraphBuilder implements GraphBuilder and is responsible for building diff --git a/terraform/graph_builder_apply_test.go b/terraform/graph_builder_apply_test.go index 616837aa2..9dd66c539 100644 --- a/terraform/graph_builder_apply_test.go +++ b/terraform/graph_builder_apply_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/graph_builder_destroy_plan.go b/terraform/graph_builder_destroy_plan.go index 1b80d8c15..9962442af 100644 --- a/terraform/graph_builder_destroy_plan.go +++ b/terraform/graph_builder_destroy_plan.go @@ -4,8 +4,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/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // DestroyPlanGraphBuilder implements GraphBuilder and is responsible for diff --git a/terraform/graph_builder_eval.go b/terraform/graph_builder_eval.go index d0832b743..18b6d5199 100644 --- a/terraform/graph_builder_eval.go +++ b/terraform/graph_builder_eval.go @@ -4,8 +4,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/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // EvalGraphBuilder implements GraphBuilder and constructs a graph suitable diff --git a/terraform/graph_builder_plan.go b/terraform/graph_builder_plan.go index 5118cf2fd..84884c3d4 100644 --- a/terraform/graph_builder_plan.go +++ b/terraform/graph_builder_plan.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/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // PlanGraphBuilder implements GraphBuilder and is responsible for building diff --git a/terraform/graph_walk_context.go b/terraform/graph_walk_context.go index bb92cc867..4c16d44c7 100644 --- a/terraform/graph_walk_context.go +++ b/terraform/graph_walk_context.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // ContextGraphWalker is the GraphWalker implementation used with the diff --git a/terraform/hook.go b/terraform/hook.go index 7a0da5069..7e927e8a5 100644 --- a/terraform/hook.go +++ b/terraform/hook.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // HookAction is an enum of actions that can be taken as a result of a hook diff --git a/terraform/hook_mock.go b/terraform/hook_mock.go index 00d4d7067..0511a5780 100644 --- a/terraform/hook_mock.go +++ b/terraform/hook_mock.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // MockHook is an implementation of Hook that can be used for tests. diff --git a/terraform/hook_stop.go b/terraform/hook_stop.go index 45c460156..2d4144e56 100644 --- a/terraform/hook_stop.go +++ b/terraform/hook_stop.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // stopHook is a private Hook implementation that Terraform uses to diff --git a/terraform/hook_test.go b/terraform/hook_test.go index 1b09898ac..0d5267daf 100644 --- a/terraform/hook_test.go +++ b/terraform/hook_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestNilHook_impl(t *testing.T) { diff --git a/terraform/node_count_boundary_test.go b/terraform/node_count_boundary_test.go index ee243f4ee..096a980ad 100644 --- a/terraform/node_count_boundary_test.go +++ b/terraform/node_count_boundary_test.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/hcl/v2/hcltest" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_data_destroy_test.go b/terraform/node_data_destroy_test.go index 790d901a3..7f06b4d4b 100644 --- a/terraform/node_data_destroy_test.go +++ b/terraform/node_data_destroy_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestNodeDataDestroyExecute(t *testing.T) { diff --git a/terraform/node_local_test.go b/terraform/node_local_test.go index bb49741ca..c79f05eab 100644 --- a/terraform/node_local_test.go +++ b/terraform/node_local_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/hcl2shim" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestNodeLocalExecute(t *testing.T) { diff --git a/terraform/node_module_expand_test.go b/terraform/node_module_expand_test.go index 3b9cd93fb..42eb91a6d 100644 --- a/terraform/node_module_expand_test.go +++ b/terraform/node_module_expand_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/instances" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_output.go b/terraform/node_output.go index caf2d76f0..70c1f6266 100644 --- a/terraform/node_output.go +++ b/terraform/node_output.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/terraform/internal/dag" "github.com/hashicorp/terraform/internal/lang" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_output_test.go b/terraform/node_output_test.go index 459f23e7e..c442e8d60 100644 --- a/terraform/node_output_test.go +++ b/terraform/node_output_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_resource_abstract.go b/terraform/node_resource_abstract.go index 1b6f57694..fb3f4a945 100644 --- a/terraform/node_resource_abstract.go +++ b/terraform/node_resource_abstract.go @@ -9,8 +9,8 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/dag" "github.com/hashicorp/terraform/internal/lang" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // ConcreteResourceNodeFunc is a callback type used to convert an diff --git a/terraform/node_resource_abstract_instance.go b/terraform/node_resource_abstract_instance.go index 823858215..df3990001 100644 --- a/terraform/node_resource_abstract_instance.go +++ b/terraform/node_resource_abstract_instance.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/terraform/internal/plans/objchange" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_resource_abstract_instance_test.go b/terraform/node_resource_abstract_instance_test.go index 53a237db0..3f7363ab3 100644 --- a/terraform/node_resource_abstract_instance_test.go +++ b/terraform/node_resource_abstract_instance_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_resource_abstract_test.go b/terraform/node_resource_abstract_test.go index aedd05b1e..186fc969b 100644 --- a/terraform/node_resource_abstract_test.go +++ b/terraform/node_resource_abstract_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_resource_apply_instance.go b/terraform/node_resource_apply_instance.go index 67f34fea4..6835f5e04 100644 --- a/terraform/node_resource_apply_instance.go +++ b/terraform/node_resource_apply_instance.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/plans/objchange" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // NodeApplyableResourceInstance represents a resource instance that is diff --git a/terraform/node_resource_apply_test.go b/terraform/node_resource_apply_test.go index b6f217a9e..4fd994954 100644 --- a/terraform/node_resource_apply_test.go +++ b/terraform/node_resource_apply_test.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/instances" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestNodeApplyableResourceExecute(t *testing.T) { diff --git a/terraform/node_resource_destroy.go b/terraform/node_resource_destroy.go index 3a771bbfe..c4f4d4b01 100644 --- a/terraform/node_resource_destroy.go +++ b/terraform/node_resource_destroy.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // NodeDestroyResourceInstance represents a resource instance that is to be diff --git a/terraform/node_resource_destroy_deposed.go b/terraform/node_resource_destroy_deposed.go index fbede7660..ceb8739d5 100644 --- a/terraform/node_resource_destroy_deposed.go +++ b/terraform/node_resource_destroy_deposed.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/dag" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // ConcreteResourceInstanceDeposedNodeFunc is a callback type used to convert diff --git a/terraform/node_resource_destroy_deposed_test.go b/terraform/node_resource_destroy_deposed_test.go index 4bb64ac0e..2a2fe9981 100644 --- a/terraform/node_resource_destroy_deposed_test.go +++ b/terraform/node_resource_destroy_deposed_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_resource_plan.go b/terraform/node_resource_plan.go index 4cc03e6d2..64850c3b7 100644 --- a/terraform/node_resource_plan.go +++ b/terraform/node_resource_plan.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/dag" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // nodeExpandPlannableResource handles the first layer of resource diff --git a/terraform/node_resource_plan_destroy.go b/terraform/node_resource_plan_destroy.go index a369aa428..907f20519 100644 --- a/terraform/node_resource_plan_destroy.go +++ b/terraform/node_resource_plan_destroy.go @@ -3,8 +3,8 @@ package terraform import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // NodePlanDestroyableResourceInstance represents a resource that is ready diff --git a/terraform/node_resource_plan_instance.go b/terraform/node_resource_plan_instance.go index d3b80a86e..87d54d720 100644 --- a/terraform/node_resource_plan_instance.go +++ b/terraform/node_resource_plan_instance.go @@ -6,8 +6,8 @@ import ( "sort" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/hashicorp/terraform/internal/addrs" ) diff --git a/terraform/node_resource_plan_orphan.go b/terraform/node_resource_plan_orphan.go index 31a873d21..2c28d88a3 100644 --- a/terraform/node_resource_plan_orphan.go +++ b/terraform/node_resource_plan_orphan.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // NodePlannableResourceInstanceOrphan represents a resource that is "applyable": diff --git a/terraform/node_resource_plan_orphan_test.go b/terraform/node_resource_plan_orphan_test.go index 4e941fe1f..3758fe399 100644 --- a/terraform/node_resource_plan_orphan_test.go +++ b/terraform/node_resource_plan_orphan_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/internal/instances" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/node_resource_plan_test.go b/terraform/node_resource_plan_test.go index bb6822e69..78aa83079 100644 --- a/terraform/node_resource_plan_test.go +++ b/terraform/node_resource_plan_test.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/instances" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestNodePlannableResourceExecute(t *testing.T) { diff --git a/terraform/schemas.go b/terraform/schemas.go index 698be0257..8531d1184 100644 --- a/terraform/schemas.go +++ b/terraform/schemas.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // Schemas is a container for various kinds of schema that Terraform needs diff --git a/terraform/terraform_test.go b/terraform/terraform_test.go index 4f8eed247..95ab31763 100644 --- a/terraform/terraform_test.go +++ b/terraform/terraform_test.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/provisioners" "github.com/hashicorp/terraform/internal/registry" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" _ "github.com/hashicorp/terraform/internal/logging" ) diff --git a/terraform/transform_attach_state.go b/terraform/transform_attach_state.go index d4b52d2f3..13694718c 100644 --- a/terraform/transform_attach_state.go +++ b/terraform/transform_attach_state.go @@ -4,7 +4,7 @@ import ( "log" "github.com/hashicorp/terraform/internal/dag" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // GraphNodeAttachResourceState is an interface that can be implemented diff --git a/terraform/transform_destroy_cbd.go b/terraform/transform_destroy_cbd.go index 3b8f3667e..5650d1a92 100644 --- a/terraform/transform_destroy_cbd.go +++ b/terraform/transform_destroy_cbd.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // GraphNodeDestroyerCBD must be implemented by nodes that might be diff --git a/terraform/transform_destroy_cbd_test.go b/terraform/transform_destroy_cbd_test.go index 5048a2512..4e4409623 100644 --- a/terraform/transform_destroy_cbd_test.go +++ b/terraform/transform_destroy_cbd_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func cbdTestGraph(t *testing.T, mod string, changes *plans.Changes, state *states.State) *Graph { diff --git a/terraform/transform_destroy_edge.go b/terraform/transform_destroy_edge.go index ecbb361d6..83ebb0758 100644 --- a/terraform/transform_destroy_edge.go +++ b/terraform/transform_destroy_edge.go @@ -4,7 +4,7 @@ import ( "log" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" diff --git a/terraform/transform_destroy_edge_test.go b/terraform/transform_destroy_edge_test.go index ac9848eb1..902baec4f 100644 --- a/terraform/transform_destroy_edge_test.go +++ b/terraform/transform_destroy_edge_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestDestroyEdgeTransformer_basic(t *testing.T) { diff --git a/terraform/transform_diff.go b/terraform/transform_diff.go index a40a5c7a6..c65d5af96 100644 --- a/terraform/transform_diff.go +++ b/terraform/transform_diff.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/terraform/internal/dag" "github.com/hashicorp/terraform/internal/plans" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // DiffTransformer is a GraphTransformer that adds graph nodes representing diff --git a/terraform/transform_import_state.go b/terraform/transform_import_state.go index 0eb0ee1b7..c86870ed4 100644 --- a/terraform/transform_import_state.go +++ b/terraform/transform_import_state.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" ) // ImportStateTransformer is a GraphTransformer that adds nodes to the diff --git a/terraform/transform_import_state_test.go b/terraform/transform_import_state_test.go index c3c2712a5..c58c243f9 100644 --- a/terraform/transform_import_state_test.go +++ b/terraform/transform_import_state_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" "github.com/zclconf/go-cty/cty" ) diff --git a/terraform/transform_orphan_count.go b/terraform/transform_orphan_count.go index 705daa9ef..5b9f3c75c 100644 --- a/terraform/transform_orphan_count.go +++ b/terraform/transform_orphan_count.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/dag" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // OrphanResourceInstanceCountTransformer is a GraphTransformer that adds orphans diff --git a/terraform/transform_orphan_count_test.go b/terraform/transform_orphan_count_test.go index 995ac69fd..a777631f0 100644 --- a/terraform/transform_orphan_count_test.go +++ b/terraform/transform_orphan_count_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestOrphanResourceCountTransformer(t *testing.T) { diff --git a/terraform/transform_orphan_output.go b/terraform/transform_orphan_output.go index d41a260c8..320c91fbe 100644 --- a/terraform/transform_orphan_output.go +++ b/terraform/transform_orphan_output.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // OrphanOutputTransformer finds the outputs that aren't present diff --git a/terraform/transform_orphan_resource.go b/terraform/transform_orphan_resource.go index f6c43bb8d..b52334ea2 100644 --- a/terraform/transform_orphan_resource.go +++ b/terraform/transform_orphan_resource.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // OrphanResourceInstanceTransformer is a GraphTransformer that adds orphaned diff --git a/terraform/transform_orphan_resource_test.go b/terraform/transform_orphan_resource_test.go index af092c8fc..2f638276e 100644 --- a/terraform/transform_orphan_resource_test.go +++ b/terraform/transform_orphan_resource_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/dag" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestOrphanResourceInstanceTransformer(t *testing.T) { diff --git a/terraform/transform_removed_modules.go b/terraform/transform_removed_modules.go index 16c51794f..090582ce2 100644 --- a/terraform/transform_removed_modules.go +++ b/terraform/transform_removed_modules.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // RemovedModuleTransformer implements GraphTransformer to add nodes indicating diff --git a/terraform/transform_state.go b/terraform/transform_state.go index a82f18591..098768ca6 100644 --- a/terraform/transform_state.go +++ b/terraform/transform_state.go @@ -3,7 +3,7 @@ package terraform import ( "log" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) // StateTransformer is a GraphTransformer that adds the elements of diff --git a/terraform/update_state_hook_test.go b/terraform/update_state_hook_test.go index b8e79c227..ac3e33f55 100644 --- a/terraform/update_state_hook_test.go +++ b/terraform/update_state_hook_test.go @@ -7,7 +7,7 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" - "github.com/hashicorp/terraform/states" + "github.com/hashicorp/terraform/internal/states" ) func TestUpdateStateHook(t *testing.T) { diff --git a/terraform/upgrade_resource_state.go b/terraform/upgrade_resource_state.go index f14289793..2b748c5c6 100644 --- a/terraform/upgrade_resource_state.go +++ b/terraform/upgrade_resource_state.go @@ -8,8 +8,8 @@ import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" + "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/hashicorp/terraform/states" "github.com/zclconf/go-cty/cty" )