| 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 |
This diagnostic occurs when a string or array exceeding the allowable length is assigned.
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>.
Warning / Error
Assign a string whose length is within the allowable range.
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'For more information about Bicep diagnostics, see Bicep core diagnostics.