This commit is contained in:
asteam
2025-07-01 13:44:09 +03:00
parent 5382579a5f
commit ddbb12996d
1041 changed files with 2842 additions and 96448 deletions

View File

@@ -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
}