Azure / Azure/azure-cli

az image builder create claims invalid JSON

Open
#18,729 5 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-observability-squad Compute feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
when running az image builder create, when passing a template JSON, the CLI always claims that the JSON is invalid.

**To Reproduce**
az image builder create -g $imageResourceGroup -n $TemplateName --image-template ImageTemplate.json

Same for any JSON - you can for example use this one: https://raw.githubusercontent.com/azure/azvmimagebuilder/master/quickquickstarts/0_Creating_a_Custom_Windows_Managed_Image/helloImageTemplateWin.json

(setting subscription etc. to valid values)

I tried with 10 different files - all same result and all are valid JSON.

**Expected behavior**
This should lead to the same resource creation as this:

az resource create --resource-group $imageResourceGroup --properties "@./ImageTemplate.json" --is-full-object `
--resource-type Microsoft.VirtualMachineImages/imageTemplates -n $TemplateName

the az resource command works fine - passing in identical JSON.

**Environment summary**
az cli 2.25.0 on Windows 10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.