Skip to content

Commit eb45f4e

Browse files
DSC requires the apiVersion field and it's no longer being emitted (#18365)
So check if that's the scope, and if so, emit it and the type, instead of the formatted name. I tested that this reverts to the necessary behavior for DSC's expectations by using `"moduleExtensionConfigs": true`. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/18365)
1 parent 6252abb commit eb45f4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Bicep.Core/Emit/TemplateWriter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,7 @@ private void EmitResource(ExpressionEmitter emitter, ImmutableArray<ExtensionExp
12551255
}
12561256

12571257
if (metadata.IsAzResource ||
1258+
Context.SemanticModel.TargetScope == ResourceScope.DesiredStateConfiguration ||
12581259
this.Context.SemanticModel.Features.ModuleExtensionConfigsEnabled)
12591260
{
12601261
emitter.EmitProperty("type", metadata.TypeReference.FormatType());

0 commit comments

Comments
 (0)