Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused schema options #2223

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions pkg/tfbridge/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ type conversionContext struct {
ProviderConfig resource.PropertyMap
ApplyDefaults bool
ApplyTFDefaults bool
ApplyMaxItemsOneDefaults bool
Assets AssetTable
UnknownCollectionsSupported bool
}
Expand Down Expand Up @@ -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)
Expand Down