Azure / azure-cli

Azure Command-Line Interface
MIT License
3.91k stars 2.87k forks source link

[ARM] Invalid JSON format for az deployment group create #28965

Open TsuyoshiUshio opened 1 month ago

TsuyoshiUshio commented 1 month ago

Describe the bug

I deploy bicep templates by following command.

az deployment group create --resource-group $resourceGroupName -o json --template-file ..\BicepTemplates\resources.bicep --parameters

However, I received Invalid JSON format. For sharing part of it. That prevent the Json Parsing.

image

Related command

az deployment group create --resource-group $resourceGroupName -o json --template-file ..\BicepTemplates\resources.bicep --parameters

Errors

Not the error message. The result object the following returns invalid JSON.

    $result = az deployment group create --resource-group $resourceGroupName -o json --template-file ..\BicepTemplates\resources.bicep --parameters `
        app_name="$appName" `
        location="$location" `
        function_plan_os="$functionPlanOS" `
        runtime_version="`"$runtimeVersion`"" `
        sku="$sku" `
        network="$network"

Issue script & Debug output

I'm MSFT guy, reach out to me, then I'll give whole information. tsushi.

Expected behavior

I expect the result should be able to parse as Json.

Environment Summary

az --version
azure-cli 2.59.0 *

core 2.59.0 * telemetry 1.1.0

Extensions: application-insights 0.1.14 azure-devops 0.26.0

Dependencies: msal 1.27.0 azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\tsushi.azure\cliextensions'

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

azure-client-tools-bot-prd[bot] commented 1 month ago

Hi @TsuyoshiUshio,

2.59.0 is not the latest Azure CLI(2.60.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.