code: func flattener(flattenList cty.Value) ([]cty.Value, bool) {
  	out := make([]cty.Value, 0)
  	for it := flattenList.ElementIterator(); it.Next(); {
  		_, val := it.Element()
  		if val.Type().IsListType() || val.Type().IsSetType() || val.Type().IsTupleType() {
  			if !val.IsKnown() {
  				return out, false
  			}
  
  			res, known := flattener(val)
  			if !known {
  				return res, known
  			}
  			out = append(out, res...)
  		} else {
  			out = append(out, val)
  		}
  	}
  	return out, true
  }
docs: // Flatten until it's not a cty.List, and return whether the value is known.
  // We can flatten lists with unknown values, as long as they are not
  // lists themselves.