From c0dee25cfd0d26afd3a216ca02a3b29417a34856 Mon Sep 17 00:00:00 2001 From: Toby Brain Date: Tue, 3 Oct 2023 15:14:29 +1100 Subject: [PATCH] Remove dependency on the old SDK (#720) * Remove dependency on the old SDK * Changelog --- .changelog/720.txt | 3 + ec/acc/datasource_deployment_basic_test.go | 4 +- ec/acc/datasource_stack_test.go | 2 +- ec/acc/datasource_tags_test.go | 4 +- ec/acc/datasource_traffic_filter_test.go | 4 +- ec/acc/deployment_autoscaling_test.go | 4 +- ec/acc/deployment_basic_defaults_test.go | 4 +- ec/acc/deployment_basic_tags_test.go | 4 +- ec/acc/deployment_basic_test.go | 6 +- ec/acc/deployment_ccs_test.go | 4 +- ec/acc/deployment_checks_test.go | 4 +- ec/acc/deployment_compute_optimized_test.go | 4 +- ec/acc/deployment_dedicated_test.go | 4 +- ec/acc/deployment_destroy_test.go | 2 +- .../deployment_docker_image_override_test.go | 4 +- ...ent_elasticsearch_kesytore_destroy_test.go | 2 +- .../deployment_elasticsearch_keystore_test.go | 6 +- ec/acc/deployment_emptyconf_test.go | 4 +- ec/acc/deployment_enterprise_search_test.go | 4 +- ec/acc/deployment_extension_basic_test.go | 4 +- .../deployment_extension_bundle_file_test.go | 6 +- ec/acc/deployment_extension_destroy_test.go | 2 +- ...ployment_extension_plugin_download_test.go | 4 +- .../deployment_failed_upgrade_retry_test.go | 4 +- ec/acc/deployment_hotwarm_test.go | 4 +- ec/acc/deployment_integrations_server_test.go | 4 +- ec/acc/deployment_keystore_test.go | 4 +- ec/acc/deployment_memory_optimized_test.go | 4 +- ec/acc/deployment_observability_self_test.go | 4 +- ec/acc/deployment_observability_test.go | 4 +- ec/acc/deployment_observability_tpl_test.go | 4 +- .../deployment_post_node_role_upgrade_test.go | 4 +- ...deployment_pre_node_role_migration_test.go | 4 +- ec/acc/deployment_security_test.go | 4 +- ec/acc/deployment_snapshot_test.go | 4 +- ec/acc/deployment_sweep_test.go | 2 +- ec/acc/deployment_template_migration_test.go | 4 +- ...loyment_traffic_filter_association_test.go | 4 +- .../deployment_traffic_filter_checks_test.go | 4 +- .../deployment_traffic_filter_destroy_test.go | 2 +- .../deployment_traffic_filter_sweep_test.go | 2 +- ec/acc/deployment_traffic_filter_test.go | 4 +- .../deployment_with_extension_bundle_test.go | 6 +- ec/acc/sweep_test.go | 2 +- .../deploymentsdatasource/datasource.go | 5 +- .../deploymentresource/deployment_test.go | 24 +++--- .../elasticsearchkeystoreresource/create.go | 5 +- .../resource_test.go | 2 +- .../extensionresource/resource_test.go | 2 +- .../resource_test.go | 2 +- .../resource_test.go | 22 ++--- .../trafficfilterresource/resource_test.go | 2 +- ec/internal/util/helpers.go | 7 ++ ec/internal/util/testutils.go | 85 ------------------- ec/version.go | 2 +- go.mod | 5 +- go.sum | 6 +- 57 files changed, 131 insertions(+), 205 deletions(-) create mode 100644 .changelog/720.txt diff --git a/.changelog/720.txt b/.changelog/720.txt new file mode 100644 index 000000000..1f1adfa75 --- /dev/null +++ b/.changelog/720.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +provider: Remove direct dependency on the old Terraform Plugin SDK +``` diff --git a/ec/acc/datasource_deployment_basic_test.go b/ec/acc/datasource_deployment_basic_test.go index e20d6363d..0d6682f4a 100644 --- a/ec/acc/datasource_deployment_basic_test.go +++ b/ec/acc/datasource_deployment_basic_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDatasourceDeployment_basic(t *testing.T) { diff --git a/ec/acc/datasource_stack_test.go b/ec/acc/datasource_stack_test.go index 4174734a1..5e11b8b40 100644 --- a/ec/acc/datasource_stack_test.go +++ b/ec/acc/datasource_stack_test.go @@ -22,7 +22,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDatasourceStack_latest(t *testing.T) { diff --git a/ec/acc/datasource_tags_test.go b/ec/acc/datasource_tags_test.go index ef22f64fc..2914502e3 100644 --- a/ec/acc/datasource_tags_test.go +++ b/ec/acc/datasource_tags_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // This test case takes ensures that the tag metadata of an "ec_deployment" diff --git a/ec/acc/datasource_traffic_filter_test.go b/ec/acc/datasource_traffic_filter_test.go index 64a96ff11..47eef2621 100644 --- a/ec/acc/datasource_traffic_filter_test.go +++ b/ec/acc/datasource_traffic_filter_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // This test creates a resource of type traffic filter with the randomName diff --git a/ec/acc/deployment_autoscaling_test.go b/ec/acc/deployment_autoscaling_test.go index d4c0246d9..0196e0145 100644 --- a/ec/acc/deployment_autoscaling_test.go +++ b/ec/acc/deployment_autoscaling_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_autoscaling(t *testing.T) { diff --git a/ec/acc/deployment_basic_defaults_test.go b/ec/acc/deployment_basic_defaults_test.go index 0b2f724b6..dfa80d7db 100644 --- a/ec/acc/deployment_basic_defaults_test.go +++ b/ec/acc/deployment_basic_defaults_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // This test case takes ensures that several features of the "ec_deployment" diff --git a/ec/acc/deployment_basic_tags_test.go b/ec/acc/deployment_basic_tags_test.go index 43dfae2bf..880860534 100644 --- a/ec/acc/deployment_basic_tags_test.go +++ b/ec/acc/deployment_basic_tags_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // This test case takes ensures that several features of the "ec_deployment" diff --git a/ec/acc/deployment_basic_test.go b/ec/acc/deployment_basic_test.go index 8207c3193..f2c0ce670 100644 --- a/ec/acc/deployment_basic_test.go +++ b/ec/acc/deployment_basic_test.go @@ -23,9 +23,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccDeployment_basic_tf(t *testing.T) { diff --git a/ec/acc/deployment_ccs_test.go b/ec/acc/deployment_ccs_test.go index 6583d2059..0ecf4fdeb 100644 --- a/ec/acc/deployment_ccs_test.go +++ b/ec/acc/deployment_ccs_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // This test case takes that on a ccs "ec_deployment". diff --git a/ec/acc/deployment_checks_test.go b/ec/acc/deployment_checks_test.go index c4a4cac96..1ea2fff2e 100644 --- a/ec/acc/deployment_checks_test.go +++ b/ec/acc/deployment_checks_test.go @@ -20,8 +20,8 @@ package acc import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi" diff --git a/ec/acc/deployment_compute_optimized_test.go b/ec/acc/deployment_compute_optimized_test.go index f130bf016..891f1e1e0 100644 --- a/ec/acc/deployment_compute_optimized_test.go +++ b/ec/acc/deployment_compute_optimized_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_computeOptimized(t *testing.T) { diff --git a/ec/acc/deployment_dedicated_test.go b/ec/acc/deployment_dedicated_test.go index 165f47866..a7bd32276 100644 --- a/ec/acc/deployment_dedicated_test.go +++ b/ec/acc/deployment_dedicated_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_dedicated_coordinating(t *testing.T) { diff --git a/ec/acc/deployment_destroy_test.go b/ec/acc/deployment_destroy_test.go index 5b70f5eff..e42bc55ca 100644 --- a/ec/acc/deployment_destroy_test.go +++ b/ec/acc/deployment_destroy_test.go @@ -20,7 +20,7 @@ package acc import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi" "github.com/elastic/cloud-sdk-go/pkg/multierror" diff --git a/ec/acc/deployment_docker_image_override_test.go b/ec/acc/deployment_docker_image_override_test.go index be8144739..018b59f0c 100644 --- a/ec/acc/deployment_docker_image_override_test.go +++ b/ec/acc/deployment_docker_image_override_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_docker_image_override(t *testing.T) { diff --git a/ec/acc/deployment_elasticsearch_kesytore_destroy_test.go b/ec/acc/deployment_elasticsearch_kesytore_destroy_test.go index 6dea775b3..3671aa9b8 100644 --- a/ec/acc/deployment_elasticsearch_kesytore_destroy_test.go +++ b/ec/acc/deployment_elasticsearch_kesytore_destroy_test.go @@ -20,7 +20,7 @@ package acc import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/eskeystoreapi" "github.com/elastic/cloud-sdk-go/pkg/multierror" diff --git a/ec/acc/deployment_elasticsearch_keystore_test.go b/ec/acc/deployment_elasticsearch_keystore_test.go index 9d45d960b..05b77ddd9 100644 --- a/ec/acc/deployment_elasticsearch_keystore_test.go +++ b/ec/acc/deployment_elasticsearch_keystore_test.go @@ -21,9 +21,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/multierror" ) diff --git a/ec/acc/deployment_emptyconf_test.go b/ec/acc/deployment_emptyconf_test.go index 06888615f..d740c857f 100644 --- a/ec/acc/deployment_emptyconf_test.go +++ b/ec/acc/deployment_emptyconf_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_emptyconfig(t *testing.T) { diff --git a/ec/acc/deployment_enterprise_search_test.go b/ec/acc/deployment_enterprise_search_test.go index 709955118..28e7aa9a3 100644 --- a/ec/acc/deployment_enterprise_search_test.go +++ b/ec/acc/deployment_enterprise_search_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_enterpriseSearch(t *testing.T) { diff --git a/ec/acc/deployment_extension_basic_test.go b/ec/acc/deployment_extension_basic_test.go index 84a8483ec..7d337ec63 100644 --- a/ec/acc/deployment_extension_basic_test.go +++ b/ec/acc/deployment_extension_basic_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeploymentExtension_basic(t *testing.T) { diff --git a/ec/acc/deployment_extension_bundle_file_test.go b/ec/acc/deployment_extension_bundle_file_test.go index 23f71a039..e84960677 100644 --- a/ec/acc/deployment_extension_bundle_file_test.go +++ b/ec/acc/deployment_extension_bundle_file_test.go @@ -27,9 +27,9 @@ import ( "path/filepath" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/client/extensions" ) diff --git a/ec/acc/deployment_extension_destroy_test.go b/ec/acc/deployment_extension_destroy_test.go index a715b506b..b8b748d95 100644 --- a/ec/acc/deployment_extension_destroy_test.go +++ b/ec/acc/deployment_extension_destroy_test.go @@ -20,7 +20,7 @@ package acc import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/api/apierror" "github.com/elastic/cloud-sdk-go/pkg/client/extensions" diff --git a/ec/acc/deployment_extension_plugin_download_test.go b/ec/acc/deployment_extension_plugin_download_test.go index d73175cd4..3c29f08bd 100644 --- a/ec/acc/deployment_extension_plugin_download_test.go +++ b/ec/acc/deployment_extension_plugin_download_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeploymentExtension_pluginDownload(t *testing.T) { diff --git a/ec/acc/deployment_failed_upgrade_retry_test.go b/ec/acc/deployment_failed_upgrade_retry_test.go index 9334cc706..d669e2deb 100644 --- a/ec/acc/deployment_failed_upgrade_retry_test.go +++ b/ec/acc/deployment_failed_upgrade_retry_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/blang/semver/v4" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) func TestAccDeployment_failed_upgrade_retry(t *testing.T) { diff --git a/ec/acc/deployment_hotwarm_test.go b/ec/acc/deployment_hotwarm_test.go index 9a72248b8..91224bf7e 100644 --- a/ec/acc/deployment_hotwarm_test.go +++ b/ec/acc/deployment_hotwarm_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) // This test case takes that on a hot/warm "ec_deployment", a select number of diff --git a/ec/acc/deployment_integrations_server_test.go b/ec/acc/deployment_integrations_server_test.go index f9346fbda..2c6b6809f 100644 --- a/ec/acc/deployment_integrations_server_test.go +++ b/ec/acc/deployment_integrations_server_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_integrationsServer(t *testing.T) { diff --git a/ec/acc/deployment_keystore_test.go b/ec/acc/deployment_keystore_test.go index ae5068243..cef183328 100644 --- a/ec/acc/deployment_keystore_test.go +++ b/ec/acc/deployment_keystore_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_keystore(t *testing.T) { diff --git a/ec/acc/deployment_memory_optimized_test.go b/ec/acc/deployment_memory_optimized_test.go index b527a9921..55bd05582 100644 --- a/ec/acc/deployment_memory_optimized_test.go +++ b/ec/acc/deployment_memory_optimized_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_memoryOptimized(t *testing.T) { diff --git a/ec/acc/deployment_observability_self_test.go b/ec/acc/deployment_observability_self_test.go index b326c0cc2..272407144 100644 --- a/ec/acc/deployment_observability_self_test.go +++ b/ec/acc/deployment_observability_self_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_observability_createWithSelfObservability(t *testing.T) { diff --git a/ec/acc/deployment_observability_test.go b/ec/acc/deployment_observability_test.go index ee9464a71..296ede899 100644 --- a/ec/acc/deployment_observability_test.go +++ b/ec/acc/deployment_observability_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_observability_first(t *testing.T) { diff --git a/ec/acc/deployment_observability_tpl_test.go b/ec/acc/deployment_observability_tpl_test.go index 6acd74019..262d34148 100644 --- a/ec/acc/deployment_observability_tpl_test.go +++ b/ec/acc/deployment_observability_tpl_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_observabilityTpl(t *testing.T) { diff --git a/ec/acc/deployment_post_node_role_upgrade_test.go b/ec/acc/deployment_post_node_role_upgrade_test.go index 7329801c6..fa1d8d5b8 100644 --- a/ec/acc/deployment_post_node_role_upgrade_test.go +++ b/ec/acc/deployment_post_node_role_upgrade_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_post_node_roles(t *testing.T) { diff --git a/ec/acc/deployment_pre_node_role_migration_test.go b/ec/acc/deployment_pre_node_role_migration_test.go index b672c3ff4..6927350e8 100644 --- a/ec/acc/deployment_pre_node_role_migration_test.go +++ b/ec/acc/deployment_pre_node_role_migration_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_pre_node_roles(t *testing.T) { diff --git a/ec/acc/deployment_security_test.go b/ec/acc/deployment_security_test.go index b0ec77994..fbf2a3cb3 100644 --- a/ec/acc/deployment_security_test.go +++ b/ec/acc/deployment_security_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_security(t *testing.T) { diff --git a/ec/acc/deployment_snapshot_test.go b/ec/acc/deployment_snapshot_test.go index 1a9adc493..5e008b344 100644 --- a/ec/acc/deployment_snapshot_test.go +++ b/ec/acc/deployment_snapshot_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ) // creds is used as a container to pass around ES credentials. diff --git a/ec/acc/deployment_sweep_test.go b/ec/acc/deployment_sweep_test.go index 7909ea688..9a916a8d6 100644 --- a/ec/acc/deployment_sweep_test.go +++ b/ec/acc/deployment_sweep_test.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi" diff --git a/ec/acc/deployment_template_migration_test.go b/ec/acc/deployment_template_migration_test.go index 6120c795d..204c3af68 100644 --- a/ec/acc/deployment_template_migration_test.go +++ b/ec/acc/deployment_template_migration_test.go @@ -20,8 +20,8 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeployment_template_migration(t *testing.T) { diff --git a/ec/acc/deployment_traffic_filter_association_test.go b/ec/acc/deployment_traffic_filter_association_test.go index 9cc38240d..61b2f5e09 100644 --- a/ec/acc/deployment_traffic_filter_association_test.go +++ b/ec/acc/deployment_traffic_filter_association_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeploymentTrafficFilterAssociation_basic(t *testing.T) { diff --git a/ec/acc/deployment_traffic_filter_checks_test.go b/ec/acc/deployment_traffic_filter_checks_test.go index 1e15360d6..ac77f2305 100644 --- a/ec/acc/deployment_traffic_filter_checks_test.go +++ b/ec/acc/deployment_traffic_filter_checks_test.go @@ -20,8 +20,8 @@ package acc import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/trafficfilterapi" diff --git a/ec/acc/deployment_traffic_filter_destroy_test.go b/ec/acc/deployment_traffic_filter_destroy_test.go index a9568c0ac..a73d1c707 100644 --- a/ec/acc/deployment_traffic_filter_destroy_test.go +++ b/ec/acc/deployment_traffic_filter_destroy_test.go @@ -20,7 +20,7 @@ package acc import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/trafficfilterapi" "github.com/elastic/cloud-sdk-go/pkg/multierror" diff --git a/ec/acc/deployment_traffic_filter_sweep_test.go b/ec/acc/deployment_traffic_filter_sweep_test.go index 54bd5241d..068942dad 100644 --- a/ec/acc/deployment_traffic_filter_sweep_test.go +++ b/ec/acc/deployment_traffic_filter_sweep_test.go @@ -21,7 +21,7 @@ import ( "strings" "sync" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/trafficfilterapi" diff --git a/ec/acc/deployment_traffic_filter_test.go b/ec/acc/deployment_traffic_filter_test.go index c22898b8d..bc5381836 100644 --- a/ec/acc/deployment_traffic_filter_test.go +++ b/ec/acc/deployment_traffic_filter_test.go @@ -23,8 +23,8 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccDeploymentTrafficFilter_basic(t *testing.T) { diff --git a/ec/acc/deployment_with_extension_bundle_test.go b/ec/acc/deployment_with_extension_bundle_test.go index dabfdc618..40cfad3e6 100644 --- a/ec/acc/deployment_with_extension_bundle_test.go +++ b/ec/acc/deployment_with_extension_bundle_test.go @@ -23,9 +23,9 @@ import ( "path/filepath" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/hashicorp/terraform-plugin-testing/helper/acctest" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/elastic/cloud-sdk-go/pkg/multierror" ) diff --git a/ec/acc/sweep_test.go b/ec/acc/sweep_test.go index b9f8cb554..77909fd59 100644 --- a/ec/acc/sweep_test.go +++ b/ec/acc/sweep_test.go @@ -20,7 +20,7 @@ package acc import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestMain(m *testing.M) { diff --git a/ec/ecdatasource/deploymentsdatasource/datasource.go b/ec/ecdatasource/deploymentsdatasource/datasource.go index c715fb989..d75669d74 100644 --- a/ec/ecdatasource/deploymentsdatasource/datasource.go +++ b/ec/ecdatasource/deploymentsdatasource/datasource.go @@ -20,19 +20,18 @@ package deploymentsdatasource import ( "context" "fmt" - "strconv" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi" "github.com/elastic/cloud-sdk-go/pkg/models" "github.com/elastic/terraform-provider-ec/ec/internal" + "github.com/elastic/terraform-provider-ec/ec/internal/util" ) var _ datasource.DataSource = &DataSource{} @@ -100,7 +99,7 @@ func modelToState(ctx context.Context, res *models.DeploymentsSearchResponse, st var diags diag.Diagnostics if b, _ := res.MarshalBinary(); len(b) > 0 { - state.ID = types.StringValue(strconv.Itoa(schema.HashString(string(b)))) + state.ID = types.StringValue(util.HashString(string(b))) } state.ReturnCount = types.Int64Value(int64(*res.ReturnCount)) diff --git a/ec/ecresource/deploymentresource/deployment_test.go b/ec/ecresource/deploymentresource/deployment_test.go index 64e141b90..f563c9878 100644 --- a/ec/ecresource/deploymentresource/deployment_test.go +++ b/ec/ecresource/deploymentresource/deployment_test.go @@ -28,7 +28,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/mock" @@ -61,24 +61,24 @@ func Test_createDeploymentWithEmptyFields(t *testing.T) { createDeploymentResponseJson := []byte(` { - "alias": "my-deployment-name", - "created": true, - "id": "accd2e61fa835a5a32bb6b2938ce91f3", + "alias": "my-deployment-name", + "created": true, + "id": "accd2e61fa835a5a32bb6b2938ce91f3", "resources": [ { - "kind": "elasticsearch", - "cloud_id": "my_deployment_name:cloud_id", - "region": "us-east-1", - "ref_id": "main-elasticsearch", + "kind": "elasticsearch", + "cloud_id": "my_deployment_name:cloud_id", + "region": "us-east-1", + "ref_id": "main-elasticsearch", "credentials": { - "username": "elastic", + "username": "elastic", "password": "password" - }, + }, "id": "resource_id" } - ], + ], "name": "my_deployment_name" - } + } `) templateFileName := "testdata/aws-io-optimized-v2.json" diff --git a/ec/ecresource/elasticsearchkeystoreresource/create.go b/ec/ecresource/elasticsearchkeystoreresource/create.go index 7e518bf9c..e1d8f64b4 100644 --- a/ec/ecresource/elasticsearchkeystoreresource/create.go +++ b/ec/ecresource/elasticsearchkeystoreresource/create.go @@ -19,14 +19,13 @@ package elasticsearchkeystoreresource import ( "context" - "strconv" "strings" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/eskeystoreapi" + "github.com/elastic/terraform-provider-ec/ec/internal/util" ) // Create will create an item in the Elasticsearch keystore @@ -73,5 +72,5 @@ func (r Resource) Create(ctx context.Context, request resource.CreateRequest, re } func hashID(elem ...string) string { - return strconv.Itoa(schema.HashString(strings.Join(elem, "-"))) + return util.HashString(strings.Join(elem, "-")) } diff --git a/ec/ecresource/elasticsearchkeystoreresource/resource_test.go b/ec/ecresource/elasticsearchkeystoreresource/resource_test.go index c39dda74a..1b5740b93 100644 --- a/ec/ecresource/elasticsearchkeystoreresource/resource_test.go +++ b/ec/ecresource/elasticsearchkeystoreresource/resource_test.go @@ -24,7 +24,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/mock" diff --git a/ec/ecresource/extensionresource/resource_test.go b/ec/ecresource/extensionresource/resource_test.go index 9a4cb8b1a..abce0c550 100644 --- a/ec/ecresource/extensionresource/resource_test.go +++ b/ec/ecresource/extensionresource/resource_test.go @@ -26,7 +26,7 @@ import ( "github.com/go-openapi/strfmt" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/mock" diff --git a/ec/ecresource/snapshotrepositoryresource/resource_test.go b/ec/ecresource/snapshotrepositoryresource/resource_test.go index 6a66cafb9..0ddcfd46a 100644 --- a/ec/ecresource/snapshotrepositoryresource/resource_test.go +++ b/ec/ecresource/snapshotrepositoryresource/resource_test.go @@ -23,7 +23,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/mock" diff --git a/ec/ecresource/trafficfilterassocresource/resource_test.go b/ec/ecresource/trafficfilterassocresource/resource_test.go index 3cb131a34..82ad7ba45 100644 --- a/ec/ecresource/trafficfilterassocresource/resource_test.go +++ b/ec/ecresource/trafficfilterassocresource/resource_test.go @@ -24,7 +24,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/mock" @@ -226,11 +226,11 @@ func readResponse() mock.Response { }, }, mock.NewStringBody(`{ - "id": "9db94e68e2f040a19dfb664d0e83bc2a", - "name": "dummy", - "type": "ip", - "include_by_default": false, - "region": "us-east-1", + "id": "9db94e68e2f040a19dfb664d0e83bc2a", + "name": "dummy", + "type": "ip", + "include_by_default": false, + "region": "us-east-1", "rules": [{"id": "6e4c8874f90d4793a2290f8199461952","source": "127.0.0.1"} ], "associations": [{"entity_type": "deployment", "id": "0a592ab2c5baf0fa95c77ac62135782e"}], "total_associations": 1 @@ -251,11 +251,11 @@ func readResponseAssociationDeleted() mock.Response { }, }, mock.NewStringBody(`{ - "id": "9db94e68e2f040a19dfb664d0e83bc2a", - "name": "dummy", - "type": "ip", - "include_by_default": false, - "region": "us-east-1", + "id": "9db94e68e2f040a19dfb664d0e83bc2a", + "name": "dummy", + "type": "ip", + "include_by_default": false, + "region": "us-east-1", "rules": [{"id": "6e4c8874f90d4793a2290f8199461952","source": "127.0.0.1"} ], "associations": [{"entity_type": "deployment", "id": "some-unrelated-id"}], "total_associations": 1 diff --git a/ec/ecresource/trafficfilterresource/resource_test.go b/ec/ecresource/trafficfilterresource/resource_test.go index beb22c8ec..0d72789c9 100644 --- a/ec/ecresource/trafficfilterresource/resource_test.go +++ b/ec/ecresource/trafficfilterresource/resource_test.go @@ -24,7 +24,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + r "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/elastic/cloud-sdk-go/pkg/api" "github.com/elastic/cloud-sdk-go/pkg/api/mock" diff --git a/ec/internal/util/helpers.go b/ec/internal/util/helpers.go index 0e4c4b32e..a232a3311 100644 --- a/ec/internal/util/helpers.go +++ b/ec/internal/util/helpers.go @@ -18,6 +18,7 @@ package util import ( + "hash/crc32" "os" "strconv" @@ -82,3 +83,9 @@ func StringToBool(str string) (bool, error) { return v, nil } + +func HashString(str string) string { + // Consistent with the old TF SDK HashString + resHash := crc32.ChecksumIEEE([]byte(str)) + return strconv.FormatUint(uint64(resHash), 10) +} diff --git a/ec/internal/util/testutils.go b/ec/internal/util/testutils.go index 04b00b22e..41cea9822 100644 --- a/ec/internal/util/testutils.go +++ b/ec/internal/util/testutils.go @@ -19,100 +19,15 @@ package util import ( "context" - "errors" "fmt" "testing" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/stretchr/testify/assert" - - "github.com/elastic/cloud-sdk-go/pkg/multierror" ) -// ResDataParams holds the raw configuration for NewResourceData to consume -type ResDataParams struct { - // ID to set for the resource. - ID string - - // The resource's schema. - Schema map[string]*schema.Schema - - // The current resource state, to simulate a create or a case where no - // previous state has been persisted, only State should be specified. - State map[string]interface{} - - // The desired resource configuration, this is useful to simulate "update" - // changes on a given resource. - Change map[string]interface{} -} - -// Validate the parameters -func (params ResDataParams) Validate() error { - merr := multierror.NewPrefixed("invalid NewResourceData parameters") - if params.ID == "" { - merr = merr.Append(errors.New("id cannot be empty")) - } - - if len(params.Schema) == 0 { - merr = merr.Append(errors.New("schema cannot be empty")) - } - - if params.State == nil { - merr = merr.Append(errors.New("state cannot be empty")) - } - - return merr.ErrorOrNil() -} - -// NewResourceData creates a ResourceData from a raw configuration map and schema. -func NewResourceData(t *testing.T, params ResDataParams) *schema.ResourceData { - t.Helper() - if err := params.Validate(); err != nil { - t.Fatal(err) - } - - return resourceDataRaw(t, - params.ID, params.Schema, params.State, params.Change, - ) -} - -// resourceDataRaw creates a ResourceData from a raw configuration map. -// Setting the ID to the specified value, and using the desired map as diff -// to be applied, if not specified, then the current is used as the desired -// configuration starting off from an empty state. -func resourceDataRaw(t *testing.T, id string, schemaMap map[string]*schema.Schema, current, desired map[string]interface{}) *schema.ResourceData { - t.Helper() - - result := generateRD(t, schemaMap, current, nil) - result.SetId(id) - if len(desired) == 0 { - return result - } - - return generateRD(t, schemaMap, desired, result.State()) -} - -func generateRD(t *testing.T, schemaMap map[string]*schema.Schema, rawAttr map[string]interface{}, state *terraform.InstanceState) *schema.ResourceData { - resCfg := terraform.NewResourceConfigRaw(rawAttr) - sm := schema.InternalMap(schemaMap) - - diff, err := sm.Diff(context.Background(), state, resCfg, nil, nil, true) - if err != nil { - t.Fatalf("err: %s", err) - } - - result, err := sm.Data(state, diff) - if err != nil { - t.Fatalf("err: %s", err) - } - - return result -} - // Check conversion to attr.Value // it should catch cases when e.g. the func under test returns types.List{} func CheckConverionToAttrValue(t *testing.T, dt datasource.DataSource, attributeName string, attributeValue types.List) { diff --git a/ec/version.go b/ec/version.go index b33edfce1..2ea997fde 100644 --- a/ec/version.go +++ b/ec/version.go @@ -18,4 +18,4 @@ package ec // Version contains the current terraform provider version. -const Version = "0.9.0-dev" +const Version = "0.10.0-dev" diff --git a/go.mod b/go.mod index f64fd1862..0b97d94f5 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-go v0.18.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 + github.com/hashicorp/terraform-plugin-testing v1.5.1 github.com/mitchellh/mapstructure v1.5.0 github.com/stretchr/testify v1.8.4 golang.org/x/exp v0.0.0-20230905200255-921286631fa9 @@ -53,6 +53,7 @@ require ( github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.18.1 // indirect github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.1 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect @@ -72,7 +73,7 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect + github.com/zclconf/go-cty v1.13.3 // indirect go.mongodb.org/mongo-driver v1.11.3 // indirect go.opentelemetry.io/otel v1.14.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect diff --git a/go.sum b/go.sum index 653d60cf0..4fda87551 100644 --- a/go.sum +++ b/go.sum @@ -155,6 +155,8 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 h1:gY4SG34ANc6ZSeWEKC9hDTChY0ZiN+Myon17fSA0Xgc= github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0/go.mod h1:deXEw/iJXtJxNV9d1c/OVJrvL7Zh0a++v7rzokW6wVY= +github.com/hashicorp/terraform-plugin-testing v1.5.1 h1:T4aQh9JAhmWo4+t1A7x+rnxAJHCDIYW9kXyo4sVO92c= +github.com/hashicorp/terraform-plugin-testing v1.5.1/go.mod h1:dg8clO6K59rZ8w9EshBmDp1CxTIPu3yA4iaDpX1h5u0= github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM= github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -262,8 +264,8 @@ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23n github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= -github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +github.com/zclconf/go-cty v1.13.3 h1:m+b9q3YDbg6Bec5rr+KGy1MzEVzY/jC2X+YX4yqKtHI= +github.com/zclconf/go-cty v1.13.3/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8=