Skip to content

Commit

Permalink
Upgrade to Framework v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SBGoods committed Dec 15, 2022
1 parent 325c26c commit 7166f1f
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 31 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.18

require (
github.com/hashicorp/terraform-plugin-docs v0.13.0
github.com/hashicorp/terraform-plugin-framework v0.17.0
github.com/hashicorp/terraform-plugin-framework-validators v0.7.0
github.com/hashicorp/terraform-plugin-framework v1.0.0
github.com/hashicorp/terraform-plugin-framework-validators v0.8.0
github.com/hashicorp/terraform-plugin-go v0.14.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e
github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM=
github.com/hashicorp/terraform-plugin-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY=
github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ=
github.com/hashicorp/terraform-plugin-framework v0.17.0 h1:0KUOY/oe1GPLFqaXnKDnd1rhCrnUtt8pV9wGEwNUFlU=
github.com/hashicorp/terraform-plugin-framework v0.17.0/go.mod h1:FV97t2BZOARkL7NNlsc/N25c84MyeSSz72uPp7Vq1lg=
github.com/hashicorp/terraform-plugin-framework-validators v0.7.0 h1:tIYOMNmEMQIc6mwun8nX3e5U3TkgZg1TpXRlBEBQHwY=
github.com/hashicorp/terraform-plugin-framework-validators v0.7.0/go.mod h1:e1RKREyEVdd3FK8Jfgz8L/ThQgcJKLb4ZJxNzsuIH0A=
github.com/hashicorp/terraform-plugin-framework v1.0.0 h1:0Mls4TrMTrDysBUby/UmlbcTOMM+n5JBDyB5k+XkGWg=
github.com/hashicorp/terraform-plugin-framework v1.0.0/go.mod h1:FV97t2BZOARkL7NNlsc/N25c84MyeSSz72uPp7Vq1lg=
github.com/hashicorp/terraform-plugin-framework-validators v0.8.0 h1:hKCuQMjD7W7reAoWn6GLkNwrDNjY9RCBWQZOJxe5LlQ=
github.com/hashicorp/terraform-plugin-framework-validators v0.8.0/go.mod h1:qkrZ542jRiCwwl3ZN/3eTKhGJ4HIBkSxGXnjJoAWtxo=
github.com/hashicorp/terraform-plugin-go v0.14.2 h1:rhsVEOGCnY04msNymSvbUsXfRLKh9znXZmHlf5e8mhE=
github.com/hashicorp/terraform-plugin-go v0.14.2/go.mod h1:Q12UjumPNGiFsZffxOsA40Tlz1WVXt2Evh865Zj0+UA=
github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs=
Expand Down
9 changes: 0 additions & 9 deletions internal/localtypes/file_permission.go

This file was deleted.

9 changes: 5 additions & 4 deletions internal/localtypes/file_permission_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ import (
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-plugin-go/tftypes"
)

var (
_ types.StringTypable = FilePermissionType{}
_ xattr.TypeWithValidate = FilePermissionType{}
_ basetypes.StringTypable = FilePermissionType{}
_ xattr.TypeWithValidate = FilePermissionType{}
)

type FilePermissionType struct {
types.StringTypable
basetypes.StringType
}

func NewFilePermissionType() FilePermissionType {
return FilePermissionType{StringTypable: types.StringType}
return FilePermissionType{StringType: types.StringType}
}

// Validate checks that the given input string is a valid file permission string,
Expand Down
3 changes: 1 addition & 2 deletions internal/provider/data_source_local_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import (
)

var (
_ datasource.DataSource = (*localFileDataSource)(nil)
_ datasource.DataSourceWithSchema = (*localFileDataSource)(nil)
_ datasource.DataSource = (*localFileDataSource)(nil)
)

func NewLocalFileDataSource() datasource.DataSource {
Expand Down
5 changes: 2 additions & 3 deletions internal/provider/data_source_local_sensitive_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import (
)

var (
_ datasource.DataSource = (*localSensitiveFileDataSource)(nil)
_ datasource.DataSourceWithSchema = (*localSensitiveFileDataSource)(nil)
_ datasource.DataSource = (*localSensitiveFileDataSource)(nil)
)

func NewLocalSensitiveFileDataSourceWithSchema() datasource.DataSourceWithSchema {
func NewLocalSensitiveFileDataSourceWithSchema() datasource.DataSource {
return &localSensitiveFileDataSource{}
}

Expand Down
4 changes: 1 addition & 3 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import (
)

var (
_ provider.Provider = (*localProvider)(nil)
_ provider.ProviderWithSchema = (*localProvider)(nil)
_ provider.ProviderWithMetadata = (*localProvider)(nil)
_ provider.Provider = (*localProvider)(nil)
)

func New() provider.Provider {
Expand Down
3 changes: 1 addition & 2 deletions internal/provider/resource_local_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import (
)

var (
_ resource.Resource = (*localFileResource)(nil)
_ resource.ResourceWithSchema = (*localFileResource)(nil)
_ resource.Resource = (*localFileResource)(nil)
)

func NewLocalFileResource() resource.Resource {
Expand Down
3 changes: 1 addition & 2 deletions internal/provider/resource_local_sensitive_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import (
)

var (
_ resource.Resource = (*localSensitiveFileResource)(nil)
_ resource.ResourceWithSchema = (*localSensitiveFileResource)(nil)
_ resource.Resource = (*localSensitiveFileResource)(nil)
)

func NewLocalSensitiveFileResource() resource.Resource {
Expand Down

0 comments on commit 7166f1f

Please sign in to comment.