Skip to content

Bump github.com/hashicorp/terraform-plugin-framework from 0.17.0 to 1.0.0 #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/83.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:note
all: Support terraform-plugin-framework version 1.0.0 types handling
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/google/go-cmp v0.5.9
github.com/hashicorp/terraform-plugin-framework v0.17.0
github.com/hashicorp/terraform-plugin-framework v1.0.0
github.com/hashicorp/terraform-plugin-go v0.14.2
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw=
github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
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 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-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
6 changes: 3 additions & 3 deletions listvalidator/value_float64s_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueFloat64sAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueFloat64sAreValidator) ValidateList(ctx context.Context, req validat
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.Float64Typable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.Float64Typable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueFloat64sAreValidator) ValidateList(ctx context.Context, req validat
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.Float64Valuable)
elementValuable, ok := element.(basetypes.Float64Valuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions listvalidator/value_int64s_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueInt64sAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueInt64sAreValidator) ValidateList(ctx context.Context, req validator
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.Int64Typable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.Int64Typable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueInt64sAreValidator) ValidateList(ctx context.Context, req validator
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.Int64Valuable)
elementValuable, ok := element.(basetypes.Int64Valuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions listvalidator/value_lists_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueListsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueListsAreValidator) ValidateList(ctx context.Context, req validator.
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.ListTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.ListTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueListsAreValidator) ValidateList(ctx context.Context, req validator.
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.ListValuable)
elementValuable, ok := element.(basetypes.ListValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions listvalidator/value_maps_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueMapsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueMapsAreValidator) ValidateList(ctx context.Context, req validator.L
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.MapTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.MapTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueMapsAreValidator) ValidateList(ctx context.Context, req validator.L
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.MapValuable)
elementValuable, ok := element.(basetypes.MapValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions listvalidator/value_numbers_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueNumbersAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueNumbersAreValidator) ValidateList(ctx context.Context, req validato
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.NumberTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.NumberTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueNumbersAreValidator) ValidateList(ctx context.Context, req validato
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.NumberValuable)
elementValuable, ok := element.(basetypes.NumberValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions listvalidator/value_sets_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueSetsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueSetsAreValidator) ValidateList(ctx context.Context, req validator.L
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.SetTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.SetTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueSetsAreValidator) ValidateList(ctx context.Context, req validator.L
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.SetValuable)
elementValuable, ok := element.(basetypes.SetValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions listvalidator/value_strings_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueStringsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueStringsAreValidator) ValidateList(ctx context.Context, req validato
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.StringTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.StringTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueStringsAreValidator) ValidateList(ctx context.Context, req validato
for idx, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtListIndex(idx)

elementValuable, ok := element.(types.StringValuable)
elementValuable, ok := element.(basetypes.StringValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions mapvalidator/value_float64s_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueFloat64sAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueFloat64sAreValidator) ValidateMap(ctx context.Context, req validato
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.Float64Typable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.Float64Typable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueFloat64sAreValidator) ValidateMap(ctx context.Context, req validato
for key, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtMapKey(key)

elementValuable, ok := element.(types.Float64Valuable)
elementValuable, ok := element.(basetypes.Float64Valuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions mapvalidator/value_int64s_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueInt64sAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueInt64sAreValidator) ValidateMap(ctx context.Context, req validator.
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.Int64Typable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.Int64Typable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueInt64sAreValidator) ValidateMap(ctx context.Context, req validator.
for key, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtMapKey(key)

elementValuable, ok := element.(types.Int64Valuable)
elementValuable, ok := element.(basetypes.Int64Valuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions mapvalidator/value_lists_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueListsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueListsAreValidator) ValidateMap(ctx context.Context, req validator.M
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.ListTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.ListTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueListsAreValidator) ValidateMap(ctx context.Context, req validator.M
for key, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtMapKey(key)

elementValuable, ok := element.(types.ListValuable)
elementValuable, ok := element.(basetypes.ListValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions mapvalidator/value_maps_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueMapsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueMapsAreValidator) ValidateMap(ctx context.Context, req validator.Ma
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.MapTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.MapTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueMapsAreValidator) ValidateMap(ctx context.Context, req validator.Ma
for key, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtMapKey(key)

elementValuable, ok := element.(types.MapValuable)
elementValuable, ok := element.(basetypes.MapValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions mapvalidator/value_numbers_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueNumbersAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueNumbersAreValidator) ValidateMap(ctx context.Context, req validator
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.NumberTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.NumberTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueNumbersAreValidator) ValidateMap(ctx context.Context, req validator
for key, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtMapKey(key)

elementValuable, ok := element.(types.NumberValuable)
elementValuable, ok := element.(basetypes.NumberValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
6 changes: 3 additions & 3 deletions mapvalidator/value_sets_are.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)

// ValueSetsAre returns an validator which ensures that any configured
Expand Down Expand Up @@ -48,7 +48,7 @@ func (v valueSetsAreValidator) ValidateMap(ctx context.Context, req validator.Ma
return
}

_, ok := req.ConfigValue.ElementType(ctx).(types.SetTypable)
_, ok := req.ConfigValue.ElementType(ctx).(basetypes.SetTypable)

if !ok {
resp.Diagnostics.AddAttributeError(
Expand All @@ -68,7 +68,7 @@ func (v valueSetsAreValidator) ValidateMap(ctx context.Context, req validator.Ma
for key, element := range req.ConfigValue.Elements() {
elementPath := req.Path.AtMapKey(key)

elementValuable, ok := element.(types.SetValuable)
elementValuable, ok := element.(basetypes.SetValuable)

// The check above should have prevented this, but raise an error
// instead of a type assertion panic or skipping the element. Any issue
Expand Down
Loading