Azure / Azure/azure-cli

az resource create install site extension example is incorrect

Open
#32,698 1 comment 0 reactions 2 assignees Claimed by @yanzhudd View on GitHub
act-identity-squad ARM Auto-Assign Azure CLI Team customer-reported Documentation question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

From [the docs](https://learn.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest#az-resource-create) is this example:
```
az resource create -g myRG --api-version "2018-02-01"
--name "{sitename+slot}/siteextensions/Contrast.NetCore.Azure.SiteExtension"
--resource-type Microsoft.Web/sites/siteextensions --is-full-object
--properties "{ \"id\": \"Contrast.NetCore.Azure.SiteExtension\", \"location\": \"West US\", \"version\": \"1.9.0\" }"
```

The correct example should be:

```
az resource create -g myRG --api-version "2018-02-01"
--name "{sitename+slot}/siteextensions/Contrast.NetCore.Azure.SiteExtension"
--resource-type Microsoft.Web/sites/siteextensions --is-full-object
--properties "{ \"location\": \"West US\", \"properties\": { \"version\": \"1.9.0\" }}"
```

The example in the docs will ignore the version specified in the properties JSON, because version is supposed to itself be nested under a "properties" object within the JSON. Specifying the id in the JSON is also unnecessary (the value won't be used)

### Related command

az resource create

### Errors

No error

### Issue script & Debug output

No relevant debug

### Expected behavior

Docs should provide correct examples

### Environment Summary

azure-cli 2.82.0

core 2.82.0
telemetry 1.1.0

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python (Windows) 3.13.9 (tags/v3.13.9:8183fa5, Oct 14 2025, 14:09:13) [MSC v.1944 64 bit (AMD64)]

### Additional context

_No response_

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.