Edit

Bicep diagnostic code - BCP446

Starting with Bicep CLI v0.43.1, Bicep restricts custom domains for module references and restores from Azure Container Registry (ACR) to avoid unsupported configurations that could result in deployment failures or compliance issues, such as moduleStore.myCompany.com. For more information, see Private module registry.

Description

Restore from registry <registry-hostname> is blocked because it isn't in the trusted registries list.

Level

Error

Examples

The following example raises the diagnostic because a custom domain is used.

module networking 'br:registry.contoso.com/bicep/modules/networking:1.0.0' = {
  name: 'networkingDeployment'
  params: {
    location: resourceGroup().location
  }
}

You can fix the error by using the native .azurecr.io (or relevant cloud-specific) domain.

module networking 'br:registry.azurecr.io/bicep/modules/networking:1.0.0' = {
  name: 'networkingDeployment'
  params: {
    location: resourceGroup().location
  }
}

Next steps

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