Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Microsoft.AzureStackHCI/clusters does not support user assigned identity as specified #28260

Open
teowa opened this issue Mar 14, 2024 · 2 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Mgmt This issue is related to a management-plane library.

Comments

@teowa
Copy link
Contributor

teowa commented Mar 14, 2024

API Spec link

API Spec version

2023-08-01, 2024-01-01

Describe the bug

According to swagger, UserAssigned should be supported for identity, but accually API does not.

"$ref": "../../../../../common-types/resource-management/v4/managedidentity.json#/definitions/ManagedServiceIdentity",

"ManagedServiceIdentityType": {
"description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
"enum": [
"None",
"SystemAssigned",
"UserAssigned",
"SystemAssigned, UserAssigned"
],
"type": "string",
"x-ms-enum": {
"name": "ManagedServiceIdentityType",
"modelAsString": true
}
},
"ManagedServiceIdentity": {
"description": "Managed service identity (system assigned and/or user assigned identities)",
"type": "object",
"properties": {
"principalId": {
"readOnly": true,
"format": "uuid",
"type": "string",
"description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity."
},
"tenantId": {
"readOnly": true,
"format": "uuid",
"type": "string",
"description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity."
},
"type": {
"$ref": "#/definitions/ManagedServiceIdentityType"
},
"userAssignedIdentities": {
"$ref": "#/definitions/UserAssignedIdentities"
}
},
"required": [
"type"
]
},

Expected behavior

The API should support UserAssigned for identity.

Actual behavior

The API does not support UserAssigned for identity.

Reproduction Steps

PUT https://management.azure.com/subscriptions/xxx/resourceGroups/wt-hcitest/providers/Microsoft.AzureStackHCI/clusters/cluster?api-version=2024-01-01

{
    "type": "microsoft.azurestackhci/clusters",
    "location": "eastus",
    "identity": {
        "type": "UserAssigned",
        "userAssignedIdentities":{
            "/subscriptions/xxx/resourceGroups/wt-hcitest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/wt-uai":{}
        }
    },
    "properties": {
    }
}

400 Bad Request
x-ms-request-id df3d1ef8-177b-431f-a8c2-08951bc36c3e
x-ms-correlation-request-id df3d1ef8-177b-431f-a8c2-08951bc36c3e

{
    "error": {
        "code": "CannotSetResourceIdentity",
        "message": "Resource type 'Microsoft.AzureStackHCI/clusters' does not support creation of 'UserAssigned' resource identity. The supported types are 'SystemAssigned'."
    }
}

Environment

postman

@teowa teowa added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 14, 2024
@zzhxiaofeng zzhxiaofeng added the Mgmt This issue is related to a management-plane library. label Mar 15, 2024
@zzhxiaofeng
Copy link

@pathuang-sia Please help have a look, thank you.

@pathuang-sia
Copy link
Contributor

@priyjain358 Would you mind taking a closer look at this one? It pertains to the cluster resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

4 participants