Skip to content

Commit

Permalink
Upgrade provider to v0.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
n3integration committed Jun 17, 2019
1 parent d7bb64a commit 257e13b
Show file tree
Hide file tree
Showing 9 changed files with 304 additions and 97 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[ ![Codeship Status for n3integration/terraform-godaddy](https://app.codeship.com/projects/29e8c490-8b5d-0134-914d-3e63d62140d1/status?branch=master)](https://app.codeship.com/projects/184616)

<dl>
<dt>Terraform v0.12.x</dt>
<dd>https://github.com/n3integration/terraform-godaddy/releases/tag/v1.7.0</dd>
<dt>Terraform v0.11.x</dt>
<dd>https://github.com/n3integration/terraform-godaddy/releases/tag/v1.6.4</dd>
<dt>Terraform v0.10.x</dt>
Expand Down
2 changes: 1 addition & 1 deletion api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func ValidateData(t, data string) error {
switch t {
case TXTType:
if len(data) < 0 || len(data) > 512 {
return fmt.Errorf("data must be between 0..512 characters in length")
return fmt.Errorf("TXT data must be between 0..512 characters in length")
}
default:
if len(data) < 0 || len(data) > 255 {
Expand Down
61 changes: 4 additions & 57 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,61 +1,8 @@
module github.com/n3integration/terraform-godaddy

require (
cloud.google.com/go v0.34.0 // indirect
github.com/agext/levenshtein v1.2.1
github.com/apparentlymart/go-cidr v1.0.0
github.com/apparentlymart/go-textseg v1.0.0
github.com/armon/go-radix v1.0.0
github.com/aws/aws-sdk-go v1.16.11
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
github.com/bgentry/speakeasy v0.1.0
github.com/blang/semver v3.5.1+incompatible
github.com/go-ini/ini v1.40.0
github.com/golang/mock v1.2.0 // indirect
github.com/golang/protobuf v1.2.0
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/go-cleanhttp v0.5.0
github.com/hashicorp/go-getter v0.0.0-20181213035916-be39683deade
github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/go-plugin v0.0.0-20181212150838-f444068e8f5a
github.com/hashicorp/go-uuid v1.0.0
github.com/hashicorp/go-version v1.0.0
github.com/hashicorp/hcl v1.0.0
github.com/hashicorp/hcl2 v0.0.0-20181220012050-6631d7cd0a68
github.com/hashicorp/hil v0.0.0-20170627220502-fa9f258a9250
github.com/hashicorp/terraform v0.11.11
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
github.com/kr/pty v1.1.3 // indirect
github.com/mattn/go-isatty v0.0.4
github.com/mitchellh/cli v1.0.0
github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/go-homedir v1.0.0
github.com/mitchellh/go-testing-interface v1.0.0
github.com/mitchellh/go-wordwrap v1.0.0
github.com/mitchellh/gox v0.4.0 // indirect
github.com/mitchellh/hashstructure v1.0.0
github.com/mitchellh/iochan v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.1.2
github.com/mitchellh/reflectwalk v1.0.0
github.com/posener/complete v1.2.1
github.com/satori/go.uuid v1.2.0
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.2.2
github.com/ulikunitz/xz v0.5.5
github.com/vmihailenco/msgpack v4.0.1+incompatible // indirect
github.com/zclconf/go-cty v0.0.0-20181218225846-4fe1e489ee06
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9
golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1 // indirect
golang.org/x/net v0.0.0-20181220203305-927f97764cc3
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb
golang.org/x/text v0.3.0
golang.org/x/tools v0.0.0-20181221235234-d00ac6d27372 // indirect
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20181221175505-bd9b4fb69e2f
google.golang.org/grpc v1.17.0
honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/terraform v0.12.2
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/stretchr/testify v1.3.0
)
316 changes: 286 additions & 30 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version=1.6.4
version=1.7.0

os=$(uname -s | tr '[:upper:]' '[:lower:]')
mach=$(uname -m)
Expand Down
2 changes: 1 addition & 1 deletion plugin/terraform-godaddy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (c *Config) Client() (*api.Client, error) {
return nil, fmt.Errorf("error setting up client: %s", err)
}

log.Print("[INFO] GoDaddy Client configured")
log.Print("GoDaddy Client configured")

return client, nil
}
9 changes: 6 additions & 3 deletions plugin/terraform-godaddy/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"github.com/hashicorp/terraform/plugin"
"github.com/hashicorp/terraform/terraform"
)

const (
Expand All @@ -10,8 +11,10 @@ const (
)

func main() {
opts := plugin.ServeOpts{
ProviderFunc: Provider,
opts := &plugin.ServeOpts{
ProviderFunc: func() terraform.ResourceProvider {
return Provider()
},
}
plugin.Serve(&opts)
plugin.Serve(opts)
}
3 changes: 1 addition & 2 deletions plugin/terraform-godaddy/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package main

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
)

// Provider returns a terraform.ResourceProvider.
func Provider() terraform.ResourceProvider {
func Provider() *schema.Provider {
return &schema.Provider{
Schema: map[string]*schema.Schema{
"key": {
Expand Down
4 changes: 2 additions & 2 deletions plugin/terraform-godaddy/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ var testAccProviders map[string]terraform.ResourceProvider
var testAccProvider *schema.Provider

func init() {
testAccProvider = Provider().(*schema.Provider)
testAccProvider = Provider()
testAccProviders = map[string]terraform.ResourceProvider{
"godaddy": testAccProvider,
}
}

func TestProvider(t *testing.T) {
if err := Provider().(*schema.Provider).InternalValidate(); err != nil {
if err := Provider().InternalValidate(); err != nil {
t.Fatalf("err: %s", err)
}
}
Expand Down

0 comments on commit 257e13b

Please sign in to comment.