Rediger

Del via


Bicep diagnostic code - BCP192

This diagnostic occurs when Bicep can't copy the external module to the local cache. For example, an incorrect module reference. For more information about using modules in Bicep and Bicep restore, see Bicep modules.

Description

Unable to restore the artifact with reference <reference>: <diagnostic-message>.

Level

Error

Solution

Fix the module reference.

Examples

The following example raises the diagnostic because the public module version doesn't exist:

module storage 'br/public:avm/res/storage/storage-account:0.1.0' = {
  name: 'myStorage'
  params: {
    name: 'store${resourceGroup().name}'
  }
}

The following example raises the diagnostic because there is a typo in the reference:

module storage 'br/public:avm/res/storage/storage-account1:0.11.1' = {
  name: 'myStorage'
  params: {
    name: 'store${resourceGroup().name}'
  }
}

You can fix the diagnostic by correct the AVM reference and the version:

module storage 'br/public:avm/res/storage/storage-account:0.11.1' = {
  name: 'myStorage'
  params: {
    name: 'store${resourceGroup().name}'
  }
}

Next steps

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