0

I have a ARM template with below syntax, trying to add user assigned identity to AZ load test resource.

 "resources": [
            {
                "type": "Microsoft.LoadTestService/loadtests",
                "apiVersion": "2021-12-01-preview",
                "name": "[parameters('name')]",
                "location": "[parameters('location')]",
                "tags": "[parameters('tags')]",
                "identity": {
                    "type": "userAssigned",
                    "userAssignedIdentities": {
                            "/subscriptions/<subscriptionId>/resourceGroups/<RGNAME>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identityName>": {}
                        }               
                }
            }
        ]

And I get below error during the deployment. Any suggestions on this error? I will remove the hardcoded resourceid part once I get pass preflight deployment.

New-AzResourceGroupDeployment: 1:02:15 PM - Error: Code=ObjectAdditionalProperties; Message=Additional properties not allowed: userAssignedIdentities. Paths in payload: '$.identity.userAssignedIdentities'
Patri
  • 3
  • 4

1 Answers1

0

Per the latest documentation, the only acceptable values for the identity are either SystemAssigned, or None for the current api.

It does appear that the property is available on the older API version, 2021-09-01-preview, per this documentation.

joelforsyth
  • 836
  • 1
  • 11
  • 28
  • thank you !! was unable to find this information ... – Patri May 02 '22 at 21:02
  • Its weird that in portal we can assign user assigned identities. the documentation says UserAssignedIdentities are acceptable. https://learn.microsoft.com/en-us/azure/load-testing/how-to-use-a-managed-identity?tabs=arm – Patri May 02 '22 at 21:11
  • It sure does! It *is* in preview though, so it could be something they are working on. I would change the API version to what they have in their example: `"2021-09-01-preview"` – joelforsyth May 02 '22 at 21:18