From 76191b9143d1274e3ac28d23107148af4115b2d3 Mon Sep 17 00:00:00 2001 From: Venelin Date: Mon, 22 Jul 2024 13:43:29 +0300 Subject: [PATCH] remove unused schema options --- pkg/tfbridge/schema.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pkg/tfbridge/schema.go b/pkg/tfbridge/schema.go index e42b79e5c..e03e28209 100644 --- a/pkg/tfbridge/schema.go +++ b/pkg/tfbridge/schema.go @@ -292,7 +292,6 @@ type conversionContext struct { ProviderConfig resource.PropertyMap ApplyDefaults bool ApplyTFDefaults bool - ApplyMaxItemsOneDefaults bool Assets AssetTable UnknownCollectionsSupported bool } @@ -648,18 +647,6 @@ func (ctx *conversionContext) makeObjectTerraformInputs( return nil, err } - if tfs != nil && ctx.ApplyMaxItemsOneDefaults { - // Iterate over the TF schema and add an empty array for each nil MaxItemsOne property. - tfs.Range(func(key string, value shim.Schema) bool { - // First do a lookup of the name/info. - _, tfi, psi := getInfoFromTerraformName(key, tfs, ps, false) - if IsMaxItemsOne(tfi, psi) && result[key] == nil { - result[key] = []interface{}{} - } - return true - }) - } - if glog.V(5) { for k, v := range result { glog.V(5).Infof("Terraform input %v = %#v", k, v)