Azure / Azure/azure-rest-api-specs

update aks encounter error when using user assigned identity

Open
#13,631 14 comments 10 reactions 0 assignees View on GitHub
ARM ARM - Core Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

swagger link: https://github.com/Azure/azure-rest-api-specs/blob/HEAD/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json#L416

reproduce step:
1. create a cluster with user assigned identity
2. get the cluster and change some property
3. update

the error message:
```Invalid value for the identities '/subscriptions/sub-id/resourceGroups/resource-group-name/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name'. The 'UserAssignedIdentities' property keys should only be empty json objects, null or the resource exisiting property."```

after investigation, the reason is:
`identity.UserAssignedIdentities` is a map, the value is readonly struct. if the update rest api contains the readonly infomation, the backend will throw this error.

some times before, there was no such limitation.

Have checked with AKS team, they says there is no such error in their codebase.
needs check from ARM team

Contributor guide

Open the contributing guide

Research direction

Start with specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-12-01/managedClusters.json at line 416, then reproduce the user-assigned-identity update described in the issue. Determine whether the REST specification represents readonly UserAssignedIdentities values in the update request; done means the update succeeds without the reported ARM validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.