Azure / Azure/azure-cli

az resource link error: ValidationError: The location property is required for this definition.

Open
#15,511 4 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Error Handling Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I expected to be able to link two arbitrary resources, but actually got an error saying, "`ValidationError: The location property is required for this definition.`" The documentation does not even list `--location` as an optional, much less a required, argument.

```
Setup$ az resource link create --link /subscriptions/54941adf-86af-44df-8048-60d8a3f53188/resourceGroups/myAppResourceGroup/providers/Microsoft.KeyVault/vaults/myKeyVault42 --target /subscriptions/54941adf-86af-44df-8048-60d8a3f53188/resourceGroups/myResourceGroup/providers/Microsoft.Network/natGateways/myNatGateway
ValidationError: The location property is required for this definition.
```

Please let me know how you'd like reproduction instructions submitted. Is it enough that they are in terms of my own resources?

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: b0a44789-a74b-537e-929e-62ff5efcaaef
* Version Independent ID: 10f4128a-7e4a-e982-4888-617b4e720855
* Content: [az resource link](https://docs.microsoft.com/en-us/cli/azure/resource/link?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/resource/link.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/resource/link.yml)
* Service: **azure-resource-manager**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

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.