Skip to content

Commit 79a17cb

Browse files
authored
Merge pull request #725 from timofurrer/feature/sdk-v2
Upgrade to SDK v2. Closes #552 🤞
2 parents bb6a929 + 3559e16 commit 79a17cb

File tree

99 files changed

+440
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+440
-380
lines changed

errcheck_excludes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(*github.com/hashicorp/terraform-plugin-sdk/helper/schema.ResourceData).Set
1+
(*github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData).Set

gitlab/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"io/ioutil"
77
"net/http"
88

9-
"github.com/hashicorp/terraform-plugin-sdk/helper/logging"
9+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
1010
"github.com/xanzy/go-gitlab"
1111
)
1212

gitlab/data_source_gitlab_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
88
"github.com/xanzy/go-gitlab"
99
)
1010

gitlab/data_source_gitlab_group_membership.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strconv"
77
"strings"
88

9-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
9+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1010
"github.com/xanzy/go-gitlab"
1111
)
1212

@@ -35,10 +35,10 @@ func dataSourceGitlabGroupMembership() *schema.Resource {
3535
},
3636
},
3737
"access_level": {
38-
Type: schema.TypeString,
39-
Computed: true,
40-
Optional: true,
41-
ValidateFunc: validateValueFunc(acceptedAccessLevels),
38+
Type: schema.TypeString,
39+
Computed: true,
40+
Optional: true,
41+
ValidateDiagFunc: validateValueFunc(acceptedAccessLevels),
4242
},
4343
"members": {
4444
Type: schema.TypeList,

gitlab/data_source_gitlab_group_membership_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
8-
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
99
)
1010

1111
func TestAccDataSourceGitlabMembership_basic(t *testing.T) {

gitlab/data_source_gitlab_group_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
8-
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
9-
"github.com/hashicorp/terraform-plugin-sdk/terraform"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9+
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
1010
)
1111

1212
func TestAccDataSourceGitlabGroup_basic(t *testing.T) {

gitlab/data_source_gitlab_project.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"log"
77
"net/http"
88

9-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
9+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1010
"github.com/xanzy/go-gitlab"
1111
)
1212

@@ -102,7 +102,6 @@ func dataSourceGitlabProject() *schema.Resource {
102102
// lintignore: S031 // TODO: Resolve this tfproviderlint issue
103103
"push_rules": {
104104
Type: schema.TypeList,
105-
MaxItems: 1,
106105
Computed: true,
107106
Elem: &schema.Resource{
108107
Schema: map[string]*schema.Schema{

gitlab/data_source_gitlab_project_protected_branch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
8-
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
8+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
99
"github.com/xanzy/go-gitlab"
1010
)
1111

gitlab/data_source_gitlab_project_protected_branch_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
8-
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
99
)
1010

1111
func TestAccDataGitlabProjectProtectedBranch_search(t *testing.T) {

gitlab/data_source_gitlab_project_protected_branches.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
88
"github.com/mitchellh/hashstructure"
99
"github.com/xanzy/go-gitlab"
1010
)

0 commit comments

Comments
 (0)