Unable to apply config using semVer with dsc extension for bicep
Prerequisites
- [x] Write a descriptive title.
- [x] Make sure you are able to repro it on the latest version
- [x] Search the existing issues.
Summary
I am attempting to use semver in bicep based dsc config files. I am using a tarball extension to support resource discovery. When I apply the config I get the following error message. I can confirm that the resource and the version (1.0.0) is present in the resource list command output
2025-11-11T00:48:16.261911Z ERROR dsc::subcommand: 111: Error: Resource not found: Microsoft.DSC.Debug/[email protected]
Environment info
- Bicep CLI version 0.38.33 (6bb5d5f859)
- dsc 3.2.0-preview.8
Steps to reproduce
- Use the following Bicep config accompanied by a dsc extension for bicep tarball. @andyleejordan provided me with one of these
{
"experimentalFeaturesEnabled": {
"desiredStateConfiguration": true,
"extensibility": true,
"localDeploy": true,
"typedVariables": true
},
"extensions": {
"dsc": "./out/dsc.tgz"
},
"implicitExtensions": []
}
- I used this DSC config file
// This is a very simple example Bicep file for testing
extension dsc
targetScope = 'desiredStateConfiguration'
// use workaround where Bicep currently requires version in date format
resource echo 'Microsoft.DSC.Debug/[email protected]' = {
output: 'Hello, world!'
}
- The Built json
{
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/config/document.json",
"languageVersion": "2.1-experimental",
"contentVersion": "1.0.0.0",
"metadata": {
"_EXPERIMENTAL_WARNING": "This template uses ARM features that are experimental. Experimental features should be enabled for testing purposes only, as there are no guarantees about the quality or stability of these features. Do not enable these settings for any production usage, or your production environment may be subject to breaking.",
"_EXPERIMENTAL_FEATURES_ENABLED": [
"Enable local deploy"
],
"_generator": {
"name": "bicep",
"version": "0.38.33.27573",
"templateHash": "1589888786853507418"
}
},
"imports": {
"dsc": {
"provider": "DesiredStateConfiguration",
"version": "0.1.0"
}
},
"resources": {
"echo": {
"import": "dsc",
"type": "Microsoft.DSC.Debug/[email protected]",
"properties": {
"output": "Hello, world!"
}
}
}
}
Expected behavior
Expected behavior is that the bicep extension correctly splits the version from the type and can apply the configuration
Actual behavior
I get an error message when I try to apply the config
2025-11-11T00:48:16.261911Z ERROR dsc::subcommand: 111: Error: Resource not found: Microsoft.DSC.Debug/[email protected]
Error details
2025-11-11T00:48:16.261911Z ERROR dsc::subcommand: 111: Error: Resource not found: Microsoft.DSC.Debug/[email protected]
Environment data
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
dsc 3.2.0-preview.8
Visuals
Similiar issue at #1118.
This was fixed in https://github.com/Azure/bicep/pull/18365. Until a release containing that fix is made, you can use "moduleExtensionConfigs": true to workaround it.