Skip to content

Commit

Permalink
Merge pull request #2 from DrFaust92/v2-bump
Browse files Browse the repository at this point in the history
v2 bump
  • Loading branch information
DrFaust92 authored Jan 24, 2022
2 parents 89725c7 + 4f6c18e commit c1ac5a8
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 322 deletions.
26 changes: 1 addition & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,6 @@ module github.com/terraform-providers/terraform-provider-influxdb
go 1.16

require (
cloud.google.com/go v0.61.0 // indirect
github.com/apparentlymart/go-cidr v1.0.1 // indirect
github.com/aws/aws-sdk-go v1.25.3 // indirect
github.com/go-test/deep v1.0.3 // indirect
github.com/google/go-cmp v0.5.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-getter v1.5.0 // indirect
github.com/hashicorp/go-hclog v0.15.0 // indirect
github.com/hashicorp/go-plugin v1.4.0 // indirect
github.com/hashicorp/go-version v1.2.1 // indirect
github.com/hashicorp/terraform v0.12.0
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
github.com/influxdata/influxdb v0.0.0-20170119032824-8e0bf700f82c
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mitchellh/cli v1.1.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/stretchr/testify v1.6.1 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.2.1 // indirect
google.golang.org/grpc v1.32.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
)
410 changes: 134 additions & 276 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion influxdb/continuous_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package influxdb
import (
"fmt"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/influxdata/influxdb/client"
)

Expand Down
4 changes: 2 additions & 2 deletions influxdb/continuous_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/influxdata/influxdb/client"
)

Expand Down
6 changes: 2 additions & 4 deletions influxdb/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import (
"net/url"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/influxdata/influxdb/client"
)

var quoteReplacer = strings.NewReplacer(`"`, `\"`)

// Provider returns a terraform.ResourceProvider.
func Provider() terraform.ResourceProvider {
func Provider() *schema.Provider {
return &schema.Provider{
ResourcesMap: map[string]*schema.Resource{
"influxdb_database": resourceDatabase(),
Expand Down
13 changes: 6 additions & 7 deletions influxdb/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package influxdb
import (
"testing"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

// To run these acceptance tests, you will need an InfluxDB server.
Expand All @@ -15,22 +14,22 @@ import (
// To run the tests against a remote InfluxDB server, set the INFLUXDB_URL,
// INFLUXDB_USERNAME and INFLUXDB_PASSWORD environment variables.

var testAccProviders map[string]terraform.ResourceProvider
var testAccProviders map[string]*schema.Provider
var testAccProvider *schema.Provider

func init() {
testAccProvider = Provider().(*schema.Provider)
testAccProviders = map[string]terraform.ResourceProvider{
testAccProvider = Provider()
testAccProviders = map[string]*schema.Provider{
"influxdb": 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)
}
}

func TestProvider_impl(t *testing.T) {
var _ terraform.ResourceProvider = Provider()
var _ *schema.Provider = Provider()
}
2 changes: 1 addition & 1 deletion influxdb/resource_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"

"encoding/json"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/influxdata/influxdb/client"
)

Expand Down
4 changes: 2 additions & 2 deletions influxdb/resource_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/influxdata/influxdb/client"
)

Expand Down
2 changes: 1 addition & 1 deletion influxdb/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/influxdata/influxdb/client"
)

Expand Down
4 changes: 2 additions & 2 deletions influxdb/resource_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/influxdata/influxdb/client"
)

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/hashicorp/terraform/plugin"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
"github.com/terraform-providers/terraform-provider-influxdb/influxdb"
)

Expand Down

0 comments on commit c1ac5a8

Please sign in to comment.