Skip to content

Commit

Permalink
Upgrade to SDK v2 (#37)
Browse files Browse the repository at this point in the history
- Upgrade to sdkv2
- Change deprecated `ImportStatePassthrough` in favour of `ImportStatePassthroughContext.
- bugfix: Add `container` field in group datasource schema
  • Loading branch information
koikonom authored Jul 31, 2020
1 parent b8198e4 commit 021b900
Show file tree
Hide file tree
Showing 1,628 changed files with 125,352 additions and 138,206 deletions.
2 changes: 1 addition & 1 deletion ad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/masterzen/winrm"
"github.com/packer-community/winrmcp/winrmcp"
)
Expand Down
2 changes: 1 addition & 1 deletion ad/data_source_ad_computer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ad
import (
"fmt"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/winrmhelper"
)

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

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

func TestAccDataSourceADComputer_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion ad/data_source_ad_gpo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ad
import (
"strings"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/winrmhelper"
)

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

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

func TestAccDatasourceADGPO_basic(t *testing.T) {
Expand Down
7 changes: 6 additions & 1 deletion ad/data_source_ad_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/terraform-provider-ad/ad/internal/winrmhelper"

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

func dataSourceADGroup() *schema.Resource {
Expand Down Expand Up @@ -43,6 +43,11 @@ func dataSourceADGroup() *schema.Resource {
Computed: true,
Description: "The Group's scope.",
},
"container": {
Type: schema.TypeString,
Computed: true,
Description: "The Group's container object.",
},
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion ad/data_source_ad_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

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

func TestAccDatasourceADGroup_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion ad/data_source_ad_ou.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strconv"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/winrmhelper"
)

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

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

func TestAccDataSourceADOU_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion ad/data_source_ad_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/terraform-provider-ad/ad/internal/winrmhelper"

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

func dataSourceADUser() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion ad/data_source_ad_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

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

func TestAccDataSourceADUser_basic(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package adschema

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

// GPOSecuritySchemaKeys is a list of all keys defined in the resource's schema
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/account_lockout.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gposec

import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/mapstructure"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/account_lockout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/application_log.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gposec

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

// ApplicationLog represents the Application Log section of the Security Settings GPO extension
type ApplicationLog struct {
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/application_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/audit_log.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gposec

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

// AuditLog represents the Audit Log section of the Security Settings GPO extension
type AuditLog struct {
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/audit_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/event_audit.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gposec

import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/mapstructure"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/event_audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/event_log_policy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gposec

import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/mapstructure"
)

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

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"gopkg.in/ini.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/file_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
"gopkg.in/ini.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/inihelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"reflect"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/mapstructure"
"golang.org/x/text/encoding/unicode"
"gopkg.in/ini.v1"
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/kerberos_settings.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gposec

import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/mapstructure"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/kerberos_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/password_policies.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gposec

import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/mapstructure"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/password_policies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

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

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"gopkg.in/ini.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/registry_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
"gopkg.in/ini.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/registry_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"gopkg.in/ini.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/registry_values_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
"gopkg.in/ini.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/restricted_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"gopkg.in/ini.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/restricted_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
"gopkg.in/ini.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/system_log.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gposec

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

// SystemLog represents the system log section of the Security Settings GPO extension
type SystemLog struct {
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/system_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gposec
import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
)

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

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"gopkg.in/ini.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/gposec/system_services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-ad/ad/internal/adschema"
"gopkg.in/ini.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/winrmhelper/winrm_computer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

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

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/winrmhelper/winrm_gplink.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

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

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/winrmhelper/winrm_gpo.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/masterzen/winrm"
"github.com/packer-community/winrmcp/winrmcp"
"gopkg.in/ini.v1"
Expand Down
2 changes: 1 addition & 1 deletion ad/internal/winrmhelper/winrm_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

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

Expand Down
2 changes: 1 addition & 1 deletion ad/internal/winrmhelper/winrm_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

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

Expand Down
Loading

0 comments on commit 021b900

Please sign in to comment.