1.3.0
This commit is contained in:
@@ -17,3 +17,12 @@ func FlattenSimpleTypeToList(ctx context.Context, elementType attr.Type, element
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// FlattenSimpleTypeToSet convert a slice of simple type to a types.Set
|
||||
func FlattenSimpleTypeToSet(ctx context.Context, elementType attr.Type, elements any) types.Set {
|
||||
res, diags := types.SetValueFrom(ctx, elementType, elements)
|
||||
if diags != nil {
|
||||
tflog.Error(ctx, fmt.Sprint("Error FlattenSimpleTypeToSet", diags))
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user