| title | BCP007 |
|---|---|
| description | This declaration type isn't recognized. Specify a metadata, parameter, variable, resource, or output declaration. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when the declaration type isn't recognized. For a list of declaration types, see Understand the structure and syntax of Bicep files.
This declaration type isn't recognized. Specify a metadata, parameter, variable, resource, or output declaration.
Error
Use the correct declaration type. For more information, see Bicep file.
The following example raises the diagnostic because parameter isn't a correct declaration type:
parameter name string You can fix the diagnostic by using the correct declaration type, param.
param name string For more information, see Parameters.
For more information about Bicep diagnostics, see Bicep core diagnostics.