Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-AzResourceGroupDeployment : Unexpected character encountered while parsing value: @. Path '', line 0, position 0. At line:1 char:1 #15959

Open
StutiSri opened this issue Dec 28, 2024 · 1 comment

Comments

@StutiSri
Copy link

PS C:\Users\stsrivastava> New-AzResourceGroupDeployment -ResourceGroupName ImpactRP-DEVTEST-Infra-Common -TemplateFile "C:\Users\stsrivastava\OneDrive - Microsoft\Projects\AzImpactRP\deploy\release-scripts\scripts\provisioning/templates/test.bicep" -Debug -Verbose
DEBUG: 10:35:20 AM - NewAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet
'ByTemplateFileWithNoParameters'.

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
DEBUG: 10:35:30 AM - using account id '[email protected]'...
DEBUG: 10:35:30 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = [].
Returning default value [True].

Confirm
Are you sure you want to perform this action?
Performing the operation "Creating Deployment" on target "ImpactRP-DEVTEST-Infra-Common".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
Redacted info related to login
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47',
UserId: '[email protected]'
DEBUG: 10:35:34 AM - [ConfigManager] Got [False] from [EnableDataCollection], Module = [], Cmdlet = [].

Confirm
Unexpected character encountered while parsing value: @. Path '', line 0, position 0.
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
New-AzResourceGroupDeployment : Unexpected character encountered while parsing value: @. Path '', line 0, position 0.
At line:1 char:1

  • New-AzResourceGroupDeployment -ResourceGroupName ImpactRP-DEVTEST-Inf ...
  •   + CategoryInfo          : CloseError: (:) [New-AzResourceGroupDeployment], JsonReaderException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
     loymentCmdlet
    
    

DEBUG: 10:35:42 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = [].
Returning default value [True].
DEBUG: 10:35:42 AM - NewAzureResourceGroupDeploymentCmdlet end processing.

Powershell Version

PS C:\Users\stsrivastava> $PSVersionTable

Name Value


PSVersion 5.1.26100.2161
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.2161
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

bicep version
PS C:\Users\stsrivastava> bicep --version
TRACE: Bicep version: 0.32.4+b326faa456, CLI arguments: "--version"
Bicep CLI version 0.32.4 (b326faa)
PS C:\Users\stsrivastava>

Az.Resources Version

PS C:\Users\stsrivastava> Get-InstalledModule -Name Az.Resources

Version Name Repository Description


7.7.0 Az.Resources PSGallery Microsoft Azure PowerShell - Azure Resource Manager and Active Directory cmdlets in Windows PowerShell and PowerShell Core. Manages subs.

The solutions mentioned here didnt help: #3140

I am able to deploy this template successfully using Az CLI.

@jeskew
Copy link
Contributor

jeskew commented Dec 31, 2024

Is the Az CLI using the same version? It maintains its own copy, and you can query the verison with az bicep version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants