Skip to content

Commit

Permalink
update module path for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
vmanilo committed Mar 16, 2024
1 parent 47d8c03 commit 3333da6
Show file tree
Hide file tree
Showing 128 changed files with 267 additions and 267 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Twingate/terraform-provider-twingate
module github.com/Twingate/terraform-provider-twingate/v2

go 1.22

Expand Down
2 changes: 1 addition & 1 deletion golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ linters-settings:
- "!$test"
allow:
- $gostd
- github.com/Twingate/terraform-provider-twingate/twingate
- github.com/Twingate/terraform-provider-twingate/v2/twingate
- github.com/hasura/go-graphql-client
- github.com/hashicorp/
- github.com/iancoleman/strcase
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"flag"
"log"

"github.com/Twingate/terraform-provider-twingate/twingate"
"github.com/Twingate/terraform-provider-twingate/v2/twingate"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
)

Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/connector-tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package client
import (
"context"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

const connectorTokensResourceName = "connector tokens"
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package client
import (
"context"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

func (client *Client) CreateConnector(ctx context.Context, input *model.Connector) (*model.Connector, error) {
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

func (client *Client) CreateGroup(ctx context.Context, input *model.Group) (*model.Group, error) {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/connector-read.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/hasura/go-graphql-client"
)

Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/connector-token-generate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type GenerateConnectorTokens struct {
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/connectors-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const CursorConnectors = "connectorsEndCursor"
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/group-create.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type CreateGroup struct {
GroupEntityResponse `graphql:"groupCreate(name: $name, userIds: $userIds, securityPolicyId: $securityPolicyId)"`
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/group-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

type ReadGroup struct {
Expand Down
6 changes: 3 additions & 3 deletions twingate/internal/client/query/groups-read.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/attr"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/attr"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const CursorGroups = "groupsEndCursor"
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/hasura/go-graphql-client"
"github.com/stretchr/testify/assert"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type ReadRemoteNetworkByID struct {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/remote-network-create.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type CreateRemoteNetwork struct {
RemoteNetworkEntityResponse `graphql:"remoteNetworkCreate(name: $name, isActive: $isActive, location: $location)"`
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/remote-network-update.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type UpdateRemoteNetwork struct {
RemoteNetworkEntityResponse `graphql:"remoteNetworkUpdate(id: $id, name: $name, location: $location)"`
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/remote-networks-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const CursorRemoteNetworks = "remoteNetworksEndCursor"
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/resource-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
"github.com/hasura/go-graphql-client"
)

Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/resources-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const CursorResources = "resourcesEndCursor"
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/security-policies-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const CursorPolicies = "policiesEndCursor"
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/security-policy-read.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type ReadSecurityPolicy struct {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/service-account-create.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type CreateServiceAccount struct {
ServiceAccountEntityResponse `graphql:"serviceAccountCreate(name: $name)"`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type CreateServiceAccountKey struct {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/service-account-key-read.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type ReadServiceAccountKey struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type UpdateServiceAccountKey struct {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/service-account-read.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type ReadShallowServiceAccount struct {
ServiceAccount *gqlServiceAccount `graphql:"serviceAccount(id: $id)"`
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/service-account-update.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type UpdateServiceAccount struct {
ServiceAccountEntityResponse `graphql:"serviceAccountUpdate(id: $id, name: $name, addedResourceIds: $addedResourceIds)"`
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/service-accounts-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
"github.com/hasura/go-graphql-client"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

type ReadShallowServiceAccounts struct {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/user-create.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type CreateUser struct {
Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/user-read.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/hasura/go-graphql-client"
)

Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/query/user-update.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package query

import "github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
import "github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"

type UserRole string
type UserStateUpdateInput string
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/query/users-read.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package query

import (
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const CursorUsers = "usersEndCursor"
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/remote-network.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package client
import (
"context"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

type RemoteNetworkLocation string
Expand Down
6 changes: 3 additions & 3 deletions twingate/internal/client/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
"github.com/hasura/go-graphql-client"
)

Expand Down
2 changes: 1 addition & 1 deletion twingate/internal/client/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/security-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"errors"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

const queryReadSecurityPolicies = "readSecurityPolicies"
Expand Down
6 changes: 3 additions & 3 deletions twingate/internal/client/service-account.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions twingate/internal/client/service-key.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package client
import (
"context"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
)

func (client *Client) CreateServiceKey(ctx context.Context, serviceAccountKey *model.ServiceKey) (*model.ServiceKey, error) {
Expand Down
6 changes: 3 additions & 3 deletions twingate/internal/client/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

"github.com/Twingate/terraform-provider-twingate/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/twingate/internal/utils"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/client/query"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/model"
"github.com/Twingate/terraform-provider-twingate/v2/twingate/internal/utils"
)

type StringFilter struct {
Expand Down
Loading

0 comments on commit 3333da6

Please sign in to comment.