Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.19 KB

File metadata and controls

45 lines (30 loc) · 1.19 KB
title BCP332
description The provided value (whose length will always be greater than or equal to <length>) is too long to assign to a target for which the maximum allowable length is <max-length>.
ms.topic reference
ms.custom devx-track-bicep
ms.date 10/30/2025

Bicep diagnostic code - BCP332

This diagnostic occurs when a string or array exceeding the allowable length is assigned.

Description

The provided value (whose length will always be greater than or equal to <length>) is too long to assign to a target for which the maximum allowable length is <max-length>.

Level

Warning / Error

Solution

Assign a string whose length is within the allowable range.

Examples

The following example raises the diagnostic because the value longerThan10 exceeds the allowable length:

@minLength(3)
@maxLength(10)
param storageAccountName string = 'longerThan10'

You can fix the diagnostic by assigning a string whose length is within the allowable range.

@minLength(3)
@maxLength(10)
param storageAccountName string = 'myStorage'

Next steps

For more information about Bicep diagnostics, see Bicep core diagnostics.