Skip to content

Commit c9ce9b5

Browse files
Remove unused schema options (#2223)
This was missed in #2049 The code was never used and instead the problem was fixed in #1971 at the root. Simplify schema.go a bit as it is complicated enough already.
1 parent c57aebd commit c9ce9b5

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

pkg/tfbridge/schema.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ type conversionContext struct {
292292
ProviderConfig resource.PropertyMap
293293
ApplyDefaults bool
294294
ApplyTFDefaults bool
295-
ApplyMaxItemsOneDefaults bool
296295
Assets AssetTable
297296
UnknownCollectionsSupported bool
298297
}
@@ -648,18 +647,6 @@ func (ctx *conversionContext) makeObjectTerraformInputs(
648647
return nil, err
649648
}
650649

651-
if tfs != nil && ctx.ApplyMaxItemsOneDefaults {
652-
// Iterate over the TF schema and add an empty array for each nil MaxItemsOne property.
653-
tfs.Range(func(key string, value shim.Schema) bool {
654-
// First do a lookup of the name/info.
655-
_, tfi, psi := getInfoFromTerraformName(key, tfs, ps, false)
656-
if IsMaxItemsOne(tfi, psi) && result[key] == nil {
657-
result[key] = []interface{}{}
658-
}
659-
return true
660-
})
661-
}
662-
663650
if glog.V(5) {
664651
for k, v := range result {
665652
glog.V(5).Infof("Terraform input %v = %#v", k, v)

0 commit comments

Comments
 (0)