@@ -14,7 +14,7 @@ import (
1414)
1515
1616func generatePrimitiveSchemaValueMakerPairs [T any ](
17- typ schema.ValueType , ctyMaker func (v T ) cty.Value , val1 , val2 , computedVal , defaultVal , nilVal T ,
17+ typ schema.ValueType , elem * schema. Schema , ctyMaker func (v T ) cty.Value , val1 , val2 , computedVal , defaultVal , nilVal T ,
1818) ([]diffSchemaValueMakerPair [T ], []diffScenario [T ]) {
1919 valueOne := ref (val1 )
2020 valueTwo := ref (val2 )
@@ -33,6 +33,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
3333 Schema : map [string ]* schema.Schema {
3434 "prop" : {
3535 Type : typ ,
36+ Elem : elem ,
3637 Optional : true ,
3738 },
3839 },
@@ -42,6 +43,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
4243 Schema : map [string ]* schema.Schema {
4344 "prop" : {
4445 Type : typ ,
46+ Elem : elem ,
4547 Optional : true ,
4648 ForceNew : true ,
4749 },
@@ -52,6 +54,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
5254 Schema : map [string ]* schema.Schema {
5355 "prop" : {
5456 Type : typ ,
57+ Elem : elem ,
5558 Required : true ,
5659 },
5760 },
@@ -61,6 +64,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
6164 Schema : map [string ]* schema.Schema {
6265 "prop" : {
6366 Type : typ ,
67+ Elem : elem ,
6468 ForceNew : true ,
6569 Required : true ,
6670 },
@@ -81,6 +85,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
8185 Schema : map [string ]* schema.Schema {
8286 "prop" : {
8387 Type : typ ,
88+ Elem : elem ,
8489 Optional : true ,
8590 Computed : true ,
8691 },
@@ -96,6 +101,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
96101 Schema : map [string ]* schema.Schema {
97102 "prop" : {
98103 Type : typ ,
104+ Elem : elem ,
99105 Optional : true ,
100106 Computed : true ,
101107 ForceNew : true ,
@@ -112,6 +118,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
112118 Schema : map [string ]* schema.Schema {
113119 "prop" : {
114120 Type : typ ,
121+ Elem : elem ,
115122 Optional : true ,
116123 Default : defaultVal ,
117124 },
@@ -122,6 +129,7 @@ func generatePrimitiveSchemaValueMakerPairs[T any](
122129 Schema : map [string ]* schema.Schema {
123130 "prop" : {
124131 Type : typ ,
132+ Elem : elem ,
125133 Optional : true ,
126134 Default : defaultVal ,
127135 ForceNew : true ,
@@ -152,7 +160,7 @@ func TestSDKv2DetailedDiffString(t *testing.T) {
152160
153161 var nilVal string
154162 schemaValueMakerPairs , scenarios := generatePrimitiveSchemaValueMakerPairs (
155- schema .TypeString , cty .StringVal , "val1" , "val2" , "computed" , "default" , nilVal )
163+ schema .TypeString , nil , cty .StringVal , "val1" , "val2" , "computed" , "default" , nilVal )
156164
157165 for _ , schemaValueMakerPair := range schemaValueMakerPairs {
158166 t .Run (schemaValueMakerPair .name , func (t * testing.T ) {
@@ -183,7 +191,7 @@ func TestSDKv2DetailedDiffBool(t *testing.T) {
183191
184192 var nilVal bool
185193 schemaValueMakerPairs , scenarios := generatePrimitiveSchemaValueMakerPairs (
186- schema .TypeBool , cty .BoolVal , true , false , true , false , nilVal )
194+ schema .TypeBool , nil , cty .BoolVal , true , false , true , false , nilVal )
187195
188196 for _ , schemaValueMakerPair := range schemaValueMakerPairs {
189197 t .Run (schemaValueMakerPair .name , func (t * testing.T ) {
@@ -214,7 +222,7 @@ func TestSDKv2DetailedDiffInt(t *testing.T) {
214222
215223 var nilVal int64
216224 schemaValueMakerPairs , scenarios := generatePrimitiveSchemaValueMakerPairs (
217- schema .TypeInt , cty .NumberIntVal , 1 , 2 , 3 , 4 , nilVal )
225+ schema .TypeInt , nil , cty .NumberIntVal , 1 , 2 , 3 , 4 , nilVal )
218226
219227 for _ , schemaValueMakerPair := range schemaValueMakerPairs {
220228 t .Run (schemaValueMakerPair .name , func (t * testing.T ) {
@@ -245,7 +253,7 @@ func TestSDKv2DetailedDiffFloat(t *testing.T) {
245253
246254 var nilVal float64
247255 schemaValueMakerPairs , scenarios := generatePrimitiveSchemaValueMakerPairs (
248- schema .TypeFloat , cty .NumberFloatVal , 1.0 , 2.0 , 3.0 , 4.0 , nilVal )
256+ schema .TypeFloat , nil , cty .NumberFloatVal , 1.0 , 2.0 , 3.0 , 4.0 , nilVal )
249257
250258 for _ , schemaValueMakerPair := range schemaValueMakerPairs {
251259 t .Run (schemaValueMakerPair .name , func (t * testing.T ) {
0 commit comments