Skip to content

Commit

Permalink
Remove dependency on the old SDK (#720)
Browse files Browse the repository at this point in the history
* Remove dependency on the old SDK

* Changelog
  • Loading branch information
tobio authored Oct 3, 2023
1 parent 3b20307 commit c0dee25
Show file tree
Hide file tree
Showing 57 changed files with 131 additions and 205 deletions.
3 changes: 3 additions & 0 deletions .changelog/720.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
provider: Remove direct dependency on the old Terraform Plugin SDK
```
4 changes: 2 additions & 2 deletions ec/acc/datasource_deployment_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ec/acc/datasource_stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/datasource_tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/datasource_traffic_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_autoscaling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_basic_defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_basic_tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions ec/acc/deployment_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_ccs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_compute_optimized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_dedicated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ec/acc/deployment_destroy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_docker_image_override_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ec/acc/deployment_elasticsearch_kesytore_destroy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions ec/acc/deployment_elasticsearch_keystore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_emptyconf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_enterprise_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_extension_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions ec/acc/deployment_extension_bundle_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion ec/acc/deployment_extension_destroy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_extension_plugin_download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_failed_upgrade_retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_hotwarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_integrations_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_keystore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_memory_optimized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_observability_self_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_observability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_observability_tpl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_post_node_role_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_pre_node_role_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ec/acc/deployment_sweep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ec/acc/deployment_template_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit c0dee25

Please sign in to comment.