diff --git a/pkg/tests/cross-tests/cross_test.go b/pkg/tests/cross-tests/cross_test.go index 90551d758c..8e068f64b8 100644 --- a/pkg/tests/cross-tests/cross_test.go +++ b/pkg/tests/cross-tests/cross_test.go @@ -107,11 +107,9 @@ func runDiffCheck(t T, tc diffTestCase) { pt.Up() - if 1+2 == 4 { - pulumiWriteYaml(t, tc, puwd, tc.Config2) - x := pt.Up() - verifyBasicDiffAgreement(t, *tfDiffPlan, x.Summary) - } + pulumiWriteYaml(t, tc, puwd, tc.Config2) + x := pt.Up() + verifyBasicDiffAgreement(t, *tfDiffPlan, x.Summary) } func toTFProvider(tc diffTestCase) *schema.Provider { @@ -124,13 +122,14 @@ func toTFProvider(tc diffTestCase) *schema.Provider { func TestUnchangedBasicObject(t *testing.T) { skipUnlessLinux(t) - cfg := map[string]any{"f0": map[string]any{"x": "ok"}} + cfg := map[string]any{"f0": []any{map[string]any{"x": "ok"}}} runDiffCheck(t, diffTestCase{ Resource: &schema.Resource{ Schema: map[string]*schema.Schema{ "f0": { Required: true, - Type: schema.TypeMap, + Type: schema.TypeList, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "x": {Optional: true, Type: schema.TypeString}, diff --git a/pkg/tfshim/sdk-v2/cty.go b/pkg/tfshim/sdk-v2/cty.go index 1cf9065215..76013531d0 100644 --- a/pkg/tfshim/sdk-v2/cty.go +++ b/pkg/tfshim/sdk-v2/cty.go @@ -130,10 +130,7 @@ func recoverCtyValue(dT cty.Type, value interface{}) (cty.Value, error) { case dT.IsListType(): return recoverCtyValueOfListType(dT, value) default: - if 1+1 == 2 { - //panic(fmt.Errorf("Cannot reconcile slice %v to %v", value, dT.GoString())) - } - return cty.NilVal, fmt.Errorf("Cannot reconcile slice %v to %v", value, dT.GoString()) + return cty.NilVal, fmt.Errorf("Cannot reconcile slice %v to %v %v %v", value, dT.GoString(), len(value), dT.IsObjectType()) } default: v, err := recoverScalarCtyValue(dT, value)