Skip to content

Commit

Permalink
switch to using gofrs/uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
davidji99 committed Jun 18, 2019
1 parent 02fe2eb commit 1085d43
Show file tree
Hide file tree
Showing 16 changed files with 669 additions and 432 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module github.com/terraform-providers/terraform-provider-mysql

require (
github.com/go-sql-driver/mysql v1.4.0
github.com/gofrs/uuid v3.2.0+incompatible
github.com/hashicorp/go-version v1.1.0
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/terraform v0.12.0
github.com/hashicorp/vault v0.11.3 // indirect
github.com/keybase/go-crypto v0.0.0-20181017165231-e696c8039bba // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/satori/go.uuid v1.2.0
golang.org/x/net v0.0.0-20190502183928-7f726cade0ab
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg=
github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
Expand Down
8 changes: 6 additions & 2 deletions mysql/resource_user_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package mysql
import (
"fmt"

"github.com/gofrs/uuid"
"github.com/hashicorp/go-version"
"github.com/hashicorp/terraform/helper/encryption"
"github.com/hashicorp/terraform/helper/schema"
"github.com/satori/go.uuid"
)

func resourceUserPassword() *schema.Resource {
Expand Down Expand Up @@ -49,7 +49,11 @@ func SetUserPassword(d *schema.ResourceData, meta interface{}) error {
return err
}

uuid := uuid.NewV4()
uuid, err := uuid.NewV4()
if err != nil {
return err
}

password := uuid.String()
pgpKey := d.Get("pgp_key").(string)
encryptionKey, err := encryption.RetrieveGPGKey(pgpKey)
Expand Down
15 changes: 15 additions & 0 deletions vendor/github.com/gofrs/uuid/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions vendor/github.com/gofrs/uuid/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
109 changes: 109 additions & 0 deletions vendor/github.com/gofrs/uuid/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1085d43

Please sign in to comment.