Skip to content

Instantly share code, notes, and snippets.

@lzap
Last active August 19, 2022 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lzap/02e488b7b65cd9fa70f728ed15f61678 to your computer and use it in GitHub Desktop.
Save lzap/02e488b7b65cd9fa70f728ed15f61678 to your computer and use it in GitHub Desktop.
MS Azure Lighthouse Test: lzap's personal account
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"mspOfferName": {
"type": "string",
"metadata": {
"description": "Specify a unique name for your offer"
},
"defaultValue": "Red Hat Cloud Provisioning"
},
"mspOfferDescription": {
"type": "string",
"metadata": {
"description": "Name of the Managed Service Provider offering"
},
"defaultValue": "Provisioning Service by console.redhat.com"
},
"managedByTenantId": {
"type": "string",
"metadata": {
"description": "Specify the tenant id of the Managed Service Provider"
},
"defaultValue": "d8191711-70fe-435f-b7b1-5dd3bbf6348f"
},
"authorizations": {
"type": "array",
"metadata": {
"description": "Specify an array of objects, containing tuples of Azure Active Directory principalId, a Azure roleDefinitionId, and an optional principalIdDisplayName. The roleDefinition specified is granted to the principalId in the provider's Active Directory and the principalIdDisplayName is visible to customers."
},
"defaultValue": [
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "acdd72a7-3385-48ef-bd42-f606fba81ae7",
"principalIdDisplayName": "Read any resource"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "91c1777a-f3dc-4fae-b103-61d183457e46",
"principalIdDisplayName": "Unregister MSP"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "9980e02c-c2be-4d73-94e8-173b1dc7cf3c",
"principalIdDisplayName": "Manage virtual machines"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "4d97b98b-1d4f-4787-a291-c67834d212e7",
"principalIdDisplayName": "Manage networks"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "ec156ff8-a8d1-4d15-830c-5b80698ca432",
"principalIdDisplayName": "Manage CDN profiles"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "befefa01-2a29-4197-83a8-272ff33ce314",
"principalIdDisplayName": "Manage DNS Zones"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "5e467623-bb1f-42f4-a55d-6e525e11384b",
"principalIdDisplayName": "Manage Storage Backups"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "add466c9-e687-43fc-8d98-dfcf8d720be5",
"principalIdDisplayName": "Manage Data Box Service"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "17d1049b-9a84-46fb-8f53-869881c3d3ab",
"principalIdDisplayName": "Manage Storage Account"
},
{
"principalId": "67e78b19-6609-4ca8-aaf2-f0a26626ea05",
"roleDefinitionId": "e5e2a7ff-d759-4cd2-bb51-3152d37e2eb1",
"principalIdDisplayName": "Manage Storage Backup Account"
}
]
}
},
"variables": {
"mspRegistrationName": "[guid(parameters('mspOfferName'))]",
"mspAssignmentName": "[guid(parameters('mspOfferName'))]"
},
"resources": [
{
"type": "Microsoft.ManagedServices/registrationDefinitions",
"apiVersion": "2019-09-01",
"name": "[variables('mspRegistrationName')]",
"properties": {
"registrationDefinitionName": "[parameters('mspOfferName')]",
"description": "[parameters('mspOfferDescription')]",
"managedByTenantId": "[parameters('managedByTenantId')]",
"authorizations": "[parameters('authorizations')]"
}
},
{
"type": "Microsoft.ManagedServices/registrationAssignments",
"apiVersion": "2019-09-01",
"name": "[variables('mspAssignmentName')]",
"dependsOn": [
"[resourceId('Microsoft.ManagedServices/registrationDefinitions/', variables('mspRegistrationName'))]"
],
"properties": {
"registrationDefinitionId": "[resourceId('Microsoft.ManagedServices/registrationDefinitions/', variables('mspRegistrationName'))]"
}
}
],
"outputs": {
"mspOfferName": {
"type": "string",
"value": "[concat('Managed by', ' ', parameters('mspOfferName'))]"
},
"authorizations": {
"type": "array",
"value": "[parameters('authorizations')]"
}
}
}