| title | Linter rule - artifacts parameters |
|---|---|
| description | Linter rule - artifacts parameters |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This rule verifies whether the artifacts parameters are defined correctly. The following conditions must be met to pass the test:
- If you provide one parameter (either
_artifactsLocationor_artifactsLocationSasToken), you must provide the other. _artifactsLocationmust be a string.- If
_artifactsLocationhas a default value, it must be eitherdeployment().properties.templateLink.urior a raw URL for its default value. _artifactsLocationSasTokenmust be a secure string.- If
_artifactsLocationSasTokenhas a default value, it must be an empty string. - If a referenced module has an
_artifactsLocationor_artifactsLocationSasTokenparameter, a value must be passed in for those parameters, even if they have default values in the module.
Use the following value in the Bicep configuration file to customize rule settings:
artifacts-parameters
The following example fails this test because _artifactsLocationSasToken is missing:
@description('The base URI where artifacts required by this template are located including a trailing \'/\'')
param _artifactsLocation string = deployment().properties.templateLink.uri
...The next example fails this test because _artifactsLocation must be either deployment().properties.templateLink.uri or a raw URL when the default value is provided, and the default value of _artifactsLocationSasToken isn't an empty string.
@description('The base URI where artifacts required by this template are located including a trailing \'/\'')
param _artifactsLocation string = 'something'
@description('SAS Token for accessing script path')
@secure()
param _artifactsLocationSasToken string = 'something'
...This example passes this test.
@description('The base URI where artifacts required by this template are located including a trailing \'/\'')
param _artifactsLocation string = deployment().properties.templateLink.uri
@description('SAS Token for accessing script path')
@secure()
param _artifactsLocationSasToken string = ''
...For more information about the linter, see Use Bicep linter.