Skip to content

az lock commands response show lockId in resourceId property #29751

@rosanch

Description

@rosanch

Describe the bug

The response for any lock command returns resource referring the resource the lock was created on (e.g. KeyVault, Storage, RG, etc), and ExtensionResource or Lock for the lock's properties. However, both ResourceId and LockId hold the exact same value. I'd imagine this is a bug since it doesn't make much sense to have the exact same value twice.

Output:
image

Related command

az lock *

Errors

No error message. Output is wrong

Issue script & Debug output

You can work around it handling the lock ID

Expected behavior

ResourceID = The resource the lock is on.
LockID = The Lock ID

Environment Summary

azure-cli 2.60.0 *

core 2.60.0 *
telemetry 1.1.0

Extensions:
acrtransfer 1.1.0
azure-devops 1.0.1

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.0b2

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

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 21:52:07) [MSC v.1937 32 bit (Intel)]

Additional context

No response

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions