Skip to content

Unhandled exception using bicep deploy with non-compatible bicepparam file #18328

@anthony-c-martin

Description

@anthony-c-martin
PS C:\Users\antmarti\Repos\bicep> bicep deploy src\vscode-bicep\src\test\e2e\examples\101\vm-simple-linux\main.bicepparam
WARNING: The following experimental Bicep features have been enabled: Enable deploy commands. 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.
C:\Users\antmarti\Repos\bicep\src\vscode-bicep\src\test\e2e\examples\101\vm-simple-linux\main.bicep(16,7) : Warning secure-secrets-in-params: Parameter 'adminPasswordOrKey' may represent a secret (according to its name) and must be declared with the '@secure()' attribute. [https://aka.ms/bicep/linter-diagnostics#secure-secrets-in-params]
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.WindowsAzure.ResourceStack.Common.Json.JsonExtensions.FromJToken[T](JToken jtoken)
   at Bicep.Cli.Helpers.Deploy.DeploymentProcessor.GetDeployCommandsConfig(IEnvironment environment, IReadOnlyDictionary`2 additionalArgs, ParametersResult result, ResourceScope scopeType)
   at Bicep.Cli.Commands.DeployCommand.RunInternal(DeployArguments args, SemanticModel model, ParametersResult result, CancellationToken cancellationToken)
   at Bicep.Cli.Commands.DeploymentsCommandsBase`1.RunAsync(TArgs args, CancellationToken cancellationToken)       
   at Bicep.Cli.Program.RunAsync(String[] args, CancellationToken cancellationToken)
   at Bicep.Cli.Program.<>c__DisplayClass3_0.<<Main>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Bicep.Cli.Program.RunWithCancellationAsync(Func`2 runFunc)
   at Bicep.Cli.Program.Main(String[] args)
   at Bicep.Cli.Program.<Main>(String[] args)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions