From 91800e9a5fc221afada2341968374f6a96a014ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 19:23:43 +0000 Subject: [PATCH 1/2] Bump github.com/hashicorp/terraform-plugin-framework Bumps [github.com/hashicorp/terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework) from 0.17.0 to 1.0.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-framework/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-framework/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-framework/compare/v0.17.0...v1.0.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-framework dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e1abc53f..4a165a46 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index 631dd0b3..a3a81b44 100644 --- a/go.sum +++ b/go.sum @@ -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= From b2a1b5ce92a70860140c5852ca778c2a2e8ffd6d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 13 Dec 2022 14:33:17 -0500 Subject: [PATCH 2/2] all: Support terraform-plugin-framework version 1.0.0 types handling --- .changelog/83.txt | 3 +++ listvalidator/value_float64s_are.go | 6 +++--- listvalidator/value_int64s_are.go | 6 +++--- listvalidator/value_lists_are.go | 6 +++--- listvalidator/value_maps_are.go | 6 +++--- listvalidator/value_numbers_are.go | 6 +++--- listvalidator/value_sets_are.go | 6 +++--- listvalidator/value_strings_are.go | 6 +++--- mapvalidator/value_float64s_are.go | 6 +++--- mapvalidator/value_int64s_are.go | 6 +++--- mapvalidator/value_lists_are.go | 6 +++--- mapvalidator/value_maps_are.go | 6 +++--- mapvalidator/value_numbers_are.go | 6 +++--- mapvalidator/value_sets_are.go | 6 +++--- mapvalidator/value_strings_are.go | 6 +++--- setvalidator/value_float64s_are.go | 6 +++--- setvalidator/value_int64s_are.go | 6 +++--- setvalidator/value_lists_are.go | 6 +++--- setvalidator/value_maps_are.go | 6 +++--- setvalidator/value_numbers_are.go | 6 +++--- setvalidator/value_sets_are.go | 6 +++--- setvalidator/value_strings_are.go | 6 +++--- 22 files changed, 66 insertions(+), 63 deletions(-) create mode 100644 .changelog/83.txt diff --git a/.changelog/83.txt b/.changelog/83.txt new file mode 100644 index 00000000..0054807d --- /dev/null +++ b/.changelog/83.txt @@ -0,0 +1,3 @@ +```release-note:note +all: Support terraform-plugin-framework version 1.0.0 types handling +``` diff --git a/listvalidator/value_float64s_are.go b/listvalidator/value_float64s_are.go index dc8f45fe..eee02c30 100644 --- a/listvalidator/value_float64s_are.go +++ b/listvalidator/value_float64s_are.go @@ -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 @@ -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( @@ -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 diff --git a/listvalidator/value_int64s_are.go b/listvalidator/value_int64s_are.go index e2825876..66daede5 100644 --- a/listvalidator/value_int64s_are.go +++ b/listvalidator/value_int64s_are.go @@ -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 @@ -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( @@ -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 diff --git a/listvalidator/value_lists_are.go b/listvalidator/value_lists_are.go index a3cf2d48..289e51fb 100644 --- a/listvalidator/value_lists_are.go +++ b/listvalidator/value_lists_are.go @@ -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 @@ -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( @@ -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 diff --git a/listvalidator/value_maps_are.go b/listvalidator/value_maps_are.go index 25148a14..39c6f688 100644 --- a/listvalidator/value_maps_are.go +++ b/listvalidator/value_maps_are.go @@ -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 @@ -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( @@ -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 diff --git a/listvalidator/value_numbers_are.go b/listvalidator/value_numbers_are.go index 7f89b9bb..21f4db23 100644 --- a/listvalidator/value_numbers_are.go +++ b/listvalidator/value_numbers_are.go @@ -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 @@ -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( @@ -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 diff --git a/listvalidator/value_sets_are.go b/listvalidator/value_sets_are.go index f1f0272d..b23be266 100644 --- a/listvalidator/value_sets_are.go +++ b/listvalidator/value_sets_are.go @@ -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 @@ -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( @@ -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 diff --git a/listvalidator/value_strings_are.go b/listvalidator/value_strings_are.go index 99aa91fc..fe33da75 100644 --- a/listvalidator/value_strings_are.go +++ b/listvalidator/value_strings_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_float64s_are.go b/mapvalidator/value_float64s_are.go index 4d50d8ea..bde78573 100644 --- a/mapvalidator/value_float64s_are.go +++ b/mapvalidator/value_float64s_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_int64s_are.go b/mapvalidator/value_int64s_are.go index 5825be7b..a83b274d 100644 --- a/mapvalidator/value_int64s_are.go +++ b/mapvalidator/value_int64s_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_lists_are.go b/mapvalidator/value_lists_are.go index 3750e28b..88788415 100644 --- a/mapvalidator/value_lists_are.go +++ b/mapvalidator/value_lists_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_maps_are.go b/mapvalidator/value_maps_are.go index 1bf7481d..f14da4da 100644 --- a/mapvalidator/value_maps_are.go +++ b/mapvalidator/value_maps_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_numbers_are.go b/mapvalidator/value_numbers_are.go index eaf13b39..5aecbcc4 100644 --- a/mapvalidator/value_numbers_are.go +++ b/mapvalidator/value_numbers_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_sets_are.go b/mapvalidator/value_sets_are.go index 7c86e864..3e1b2375 100644 --- a/mapvalidator/value_sets_are.go +++ b/mapvalidator/value_sets_are.go @@ -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 @@ -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( @@ -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 diff --git a/mapvalidator/value_strings_are.go b/mapvalidator/value_strings_are.go index 7ab1c041..425fef52 100644 --- a/mapvalidator/value_strings_are.go +++ b/mapvalidator/value_strings_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueStringsAreValidator) ValidateMap(ctx context.Context, req validator return } - _, ok := req.ConfigValue.ElementType(ctx).(types.StringTypable) + _, ok := req.ConfigValue.ElementType(ctx).(basetypes.StringTypable) if !ok { resp.Diagnostics.AddAttributeError( @@ -68,7 +68,7 @@ func (v valueStringsAreValidator) ValidateMap(ctx context.Context, req validator for key, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtMapKey(key) - 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 diff --git a/setvalidator/value_float64s_are.go b/setvalidator/value_float64s_are.go index f9a9be42..702478d1 100644 --- a/setvalidator/value_float64s_are.go +++ b/setvalidator/value_float64s_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueFloat64sAreValidator) ValidateSet(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( @@ -68,7 +68,7 @@ func (v valueFloat64sAreValidator) ValidateSet(ctx context.Context, req validato for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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 diff --git a/setvalidator/value_int64s_are.go b/setvalidator/value_int64s_are.go index de9fe7b6..84ae5a7a 100644 --- a/setvalidator/value_int64s_are.go +++ b/setvalidator/value_int64s_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueInt64sAreValidator) ValidateSet(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( @@ -68,7 +68,7 @@ func (v valueInt64sAreValidator) ValidateSet(ctx context.Context, req validator. for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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 diff --git a/setvalidator/value_lists_are.go b/setvalidator/value_lists_are.go index c5352674..dfb55be8 100644 --- a/setvalidator/value_lists_are.go +++ b/setvalidator/value_lists_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueListsAreValidator) ValidateSet(ctx context.Context, req validator.S return } - _, ok := req.ConfigValue.ElementType(ctx).(types.ListTypable) + _, ok := req.ConfigValue.ElementType(ctx).(basetypes.ListTypable) if !ok { resp.Diagnostics.AddAttributeError( @@ -68,7 +68,7 @@ func (v valueListsAreValidator) ValidateSet(ctx context.Context, req validator.S for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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 diff --git a/setvalidator/value_maps_are.go b/setvalidator/value_maps_are.go index 664fb92e..725cfd96 100644 --- a/setvalidator/value_maps_are.go +++ b/setvalidator/value_maps_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueMapsAreValidator) ValidateSet(ctx context.Context, req validator.Se return } - _, ok := req.ConfigValue.ElementType(ctx).(types.MapTypable) + _, ok := req.ConfigValue.ElementType(ctx).(basetypes.MapTypable) if !ok { resp.Diagnostics.AddAttributeError( @@ -68,7 +68,7 @@ func (v valueMapsAreValidator) ValidateSet(ctx context.Context, req validator.Se for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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 diff --git a/setvalidator/value_numbers_are.go b/setvalidator/value_numbers_are.go index 7efacdf5..1a772326 100644 --- a/setvalidator/value_numbers_are.go +++ b/setvalidator/value_numbers_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueNumbersAreValidator) ValidateSet(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( @@ -68,7 +68,7 @@ func (v valueNumbersAreValidator) ValidateSet(ctx context.Context, req validator for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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 diff --git a/setvalidator/value_sets_are.go b/setvalidator/value_sets_are.go index 243dd87c..37ad6bdb 100644 --- a/setvalidator/value_sets_are.go +++ b/setvalidator/value_sets_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueSetsAreValidator) ValidateSet(ctx context.Context, req validator.Se return } - _, ok := req.ConfigValue.ElementType(ctx).(types.SetTypable) + _, ok := req.ConfigValue.ElementType(ctx).(basetypes.SetTypable) if !ok { resp.Diagnostics.AddAttributeError( @@ -68,7 +68,7 @@ func (v valueSetsAreValidator) ValidateSet(ctx context.Context, req validator.Se for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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 diff --git a/setvalidator/value_strings_are.go b/setvalidator/value_strings_are.go index 11a040ac..8eb3dcfb 100644 --- a/setvalidator/value_strings_are.go +++ b/setvalidator/value_strings_are.go @@ -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 @@ -48,7 +48,7 @@ func (v valueStringsAreValidator) ValidateSet(ctx context.Context, req validator return } - _, ok := req.ConfigValue.ElementType(ctx).(types.StringTypable) + _, ok := req.ConfigValue.ElementType(ctx).(basetypes.StringTypable) if !ok { resp.Diagnostics.AddAttributeError( @@ -68,7 +68,7 @@ func (v valueStringsAreValidator) ValidateSet(ctx context.Context, req validator for _, element := range req.ConfigValue.Elements() { elementPath := req.Path.AtSetValue(element) - 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