diff --git a/sdk/servicebus/test-resources.json b/sdk/servicebus/test-resources.json index 1b7089c4bb46..00b06bd6e720 100755 --- a/sdk/servicebus/test-resources.json +++ b/sdk/servicebus/test-resources.json @@ -9,28 +9,36 @@ "description": "The base resource name." } }, + "subscriptionId": { + "type": "string", + "defaultValue": "[subscription().subscriptionId]", + "metadata": { + "description": "The subscription ID to which the application and resources belong." + } + }, "tenantId": { "type": "string", + "defaultValue": "[subscription().tenantId]", "metadata": { "description": "The tenant ID to which the application and resources belong." } }, - "testApplicationId": { + "testApplicationOid": { "type": "string", "metadata": { - "description": "The application client ID used to run tests." + "description": "The client OID to grant access to test resources." } }, - "testApplicationSecret": { + "testApplicationId": { "type": "string", "metadata": { - "description": "The application client secret used to run tests." + "description": "The application client ID used to run tests." } }, - "testApplicationOid": { + "testApplicationSecret": { "type": "string", "metadata": { - "description": "The client OID to grant access to test resources." + "description": "The application client secret used to run tests." } }, "location": { @@ -42,25 +50,35 @@ } }, "variables": { - "serviceBusDataOwnerRoleId": "090c5cfd-751d-490a-894a-3ce6f1109419", - "subscriptionId": "[subscription().id]" + "contributorRoleId": "b24988ac-6180-42a0-ab88-20f7382dd24c", + "serviceBusDataOwnerRoleId": "090c5cfd-751d-490a-894a-3ce6f1109419" }, "resources": [ { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2019-04-01-preview", - "name": "[guid(resourceGroup().id)]", + "name": "[guid(resourceGroup().id, deployment().name, variables('serviceBusDataOwnerRoleId'))]", "properties": { "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('serviceBusDataOwnerRoleId'))]", "principalId": "[parameters('testApplicationOid')]", "scope": "[resourceGroup().id]" } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2019-04-01-preview", + "name": "[guid(resourceGroup().id, deployment().name, variables('contributorRoleId'))]", + "properties": { + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('contributorRoleId'))]", + "principalId": "[parameters('testApplicationOid')]", + "scope": "[resourceGroup().id]" + } } ], "outputs": { "SERVICE_BUS_SUBSCRIPTION": { "type": "string", - "value": "[guid(variables('subscriptionId'))]" + "value": "[parameters('subscriptionId')]" }, "SERVICE_BUS_TENANT": { "type": "string",