You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled exception. System.InvalidOperationException: Cannot emit parameter's KeyVault secret reference.
at Bicep.Core.Emit.ExpressionEmitter.EmitModuleParameterValue(SyntaxBase syntax)
at Bicep.Core.Emit.TemplateWriter.EmitModuleParameters(JsonTextWriter jsonWriter, ModuleSymbol moduleSymbol, ExpressionEmitter emitter)
at Bicep.Core.Emit.TemplateWriter.EmitModule(JsonTextWriter jsonWriter, ModuleSymbol moduleSymbol, ExpressionEmitter emitter)
at Bicep.Core.Emit.TemplateWriter.EmitResources(JsonTextWriter jsonWriter, ExpressionEmitter emitter)
at Bicep.Core.Emit.TemplateWriter.GenerateTemplateWithoutHash()
at Bicep.Core.Emit.TemplateWriter.Write(JsonTextWriter writer)
at Bicep.Core.Emit.TemplateWriter.EmitModule(JsonTextWriter jsonWriter, ModuleSymbol moduleSymbol, ExpressionEmitter emitter)
at Bicep.Core.Emit.TemplateWriter.EmitResources(JsonTextWriter jsonWriter, ExpressionEmitter emitter)
at Bicep.Core.Emit.TemplateWriter.GenerateTemplateWithoutHash()
at Bicep.Core.Emit.TemplateWriter.Write(JsonTextWriter writer)
at Bicep.Core.Emit.TemplateEmitter.<>c__DisplayClass5_0.<Emit>b__0()
at Bicep.Core.Emit.TemplateEmitter.EmitOrFail(Action write)
at Bicep.Core.Emit.TemplateEmitter.Emit(Stream stream)
at Bicep.Cli.Program.BuildToFile(IDiagnosticLogger logger, String bicepPath, String outputPath)
at Bicep.Cli.Program.Build(ILogger logger, BuildOrDecompileArguments arguments)
at Bicep.Cli.Program.Run(String[] args)
at Bicep.Cli.Program.Main(String[] args)
Seems there is some problem with using getSecret with multiple existing references.
To Reproduce
Described above
Additional context
The text was updated successfully, but these errors were encountered:
@alex-frankel I think this might be important bug. Noticed it when I was trying to improve my example with the new functionality. Overall every new function should work with:
TBH I forgot that we allow loops on existing resources...
Error is thrown because var objectSymbol = context.SemanticModel.GetSymbolInfo(instanceFunctionCall.BaseExpression) is returning null, because the BaseExpression is ArrayAccessSyntax. I need to handle that case and construct resourceId function call taking into account the loop on the existing resource.
Bicep version
Bicep CLI version 0.3.539 (c8b397d)
Describe the bug
I have the following code
When I run bicep build I get:
Seems there is some problem with using getSecret with multiple existing references.
To Reproduce
Described above
Additional context
The text was updated successfully, but these errors were encountered: