diff --git a/go.mod b/go.mod index 1634c787..398541b8 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,12 @@ require ( github.com/Pallinder/go-randomdata v1.2.0 github.com/blang/semver/v4 v4.0.0 github.com/cloudfoundry/cloud-service-broker/v2 v2.0.2 + github.com/google/uuid v1.6.0 github.com/hashicorp/terraform-json v0.22.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/otiai10/copy v1.14.0 - github.com/pborman/uuid v1.2.1 golang.org/x/exp v0.0.0-20230905200255-921286631fa9 golang.org/x/tools v0.21.0 gopkg.in/yaml.v3 v3.0.1 @@ -59,7 +59,6 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -104,6 +103,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.0.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect + github.com/pborman/uuid v1.2.1 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pivotal-cf/brokerapi/v11 v11.0.0 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect diff --git a/providers/terraform-provider-csbmssqldbrunfailover/csbmssqldbrunfailover/resource_run_failover_test.go b/providers/terraform-provider-csbmssqldbrunfailover/csbmssqldbrunfailover/resource_run_failover_test.go index 854bdd73..45135e81 100644 --- a/providers/terraform-provider-csbmssqldbrunfailover/csbmssqldbrunfailover/resource_run_failover_test.go +++ b/providers/terraform-provider-csbmssqldbrunfailover/csbmssqldbrunfailover/resource_run_failover_test.go @@ -8,12 +8,12 @@ import ( "csbbrokerpakazure/providers/terraform-provider-csbmssqldbrunfailover/testhelpers" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pborman/uuid" ) var _ = Describe("resource_run_failover resource", Ordered, Label("acceptance"), func() { @@ -45,13 +45,13 @@ var _ = Describe("resource_run_failover resource", Ordered, Label("acceptance"), var err error config = testhelpers.FailoverConfig{ - ResourceGroupName: fmt.Sprintf("resourcegroupname-%s", uuid.New()), - ServerName: fmt.Sprintf("servername-%s", uuid.New()), + ResourceGroupName: fmt.Sprintf("resourcegroupname-%s", uuid.NewString()), + ServerName: fmt.Sprintf("servername-%s", uuid.NewString()), MainLocation: "eastus", PartnerServerLocation: "eastus2", - PartnerServerName: fmt.Sprintf("partnerservername-%s", uuid.New()), + PartnerServerName: fmt.Sprintf("partnerservername-%s", uuid.NewString()), SubscriptionID: azureSubscriptionID, - FailoverGroupName: fmt.Sprintf("failovergroupname-%s", uuid.New()), + FailoverGroupName: fmt.Sprintf("failovergroupname-%s", uuid.NewString()), } failoverData, err = testhelpers.CreateFailoverGroup(config) diff --git a/providers/terraform-provider-csbmssqldbrunfailover/testhelpers/failover.go b/providers/terraform-provider-csbmssqldbrunfailover/testhelpers/failover.go index 0d3b60b1..0a9b31df 100644 --- a/providers/terraform-provider-csbmssqldbrunfailover/testhelpers/failover.go +++ b/providers/terraform-provider-csbmssqldbrunfailover/testhelpers/failover.go @@ -10,7 +10,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" - "github.com/pborman/uuid" + "github.com/google/uuid" ) type FailoverData struct { @@ -92,8 +92,8 @@ func createServer(ctx context.Context, cred azcore.TokenCredential, resourceGrou armsql.Server{ Location: to.Ptr(location), Properties: &armsql.ServerProperties{ - AdministratorLogin: to.Ptr(fmt.Sprintf("dummylogin-%s", uuid.New())), - AdministratorLoginPassword: to.Ptr(fmt.Sprintf("dummyPassword-%s", uuid.New())), + AdministratorLogin: to.Ptr(fmt.Sprintf("dummylogin-%s", uuid.NewString())), + AdministratorLoginPassword: to.Ptr(fmt.Sprintf("dummyPassword-%s", uuid.NewString())), }, }, nil,