-
Notifications
You must be signed in to change notification settings - Fork 289
/
marketplaceDelegatedResourceManagement.json
114 lines (114 loc) · 4.74 KB
/
marketplaceDelegatedResourceManagement.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"mspOfferName": {
"type": "string",
"metadata": {
"description": "Provide a name for this registration definition. For example the name of the Managed Service Provider's offer"
}
},
"mspOfferDescription": {
"type": "string",
"metadata": {
"description": "Provide a description for this registration definition. For example contact or contract details."
}
},
"managedByTenantId": {
"type": "string",
"metadata": {
"description": "Specify the Azure Active Directory tenant id of the Managed Service Provider. Resources will be shared to this tenant."
}
},
"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."
}
},
"marketplaceOffer": {
"type": "string",
"defaultValue": "Yes",
"metadata": {
"description": "Does this deployment include plan details that match an offer published in the Azure Marketplace?"
}
},
"marketplacePublisherId": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Must match the Azure Marketplace Publisher ID for the marketplace offer."
}
},
"marketplaceOfferId": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Must match the Azure Marketplace Offer ID for the marketplace offer."
}
},
"marketplacePlanId": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Must match the Azure Marketplace Plan ID for the plan within the marketplace offer."
}
},
"marketplacePlanVersion": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Must match the Azure Marketplace Plan version for the plan within the marketplace offer."
}
}
},
"variables": {
"mspRegistrationName": "[guid(parameters('mspOfferName'))]",
"mspAssignmentName": "[guid(parameters('mspOfferName'))]",
"marketplacePlan": {
"name": "[parameters('marketplacePlanId')]",
"product": "[parameters('marketplaceOfferId')]",
"publisher": "[parameters('marketplacePublisherId')]",
"version": "[parameters('marketplacePlanVersion')]"
}
},
"resources": [
{
"type": "Microsoft.ManagedServices/registrationDefinitions",
"apiVersion": "2019-06-01",
"name": "[variables('mspRegistrationName')]",
"properties": {
"registrationDefinitionName": "[parameters('mspOfferName')]",
"description": "[parameters('mspOfferDescription')]",
"managedByTenantId": "[parameters('managedByTenantId')]",
"authorizations": "[parameters('authorizations')]"
},
"plan": "[if(equals(parameters('marketplaceOffer'), 'Yes'), variables('marketplacePlan'), json('null'))]"
},
{
"type": "Microsoft.ManagedServices/registrationAssignments",
"apiVersion": "2019-06-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')]"
},
"marketplace": {
"type": "object",
"value": "[if(equals(parameters('marketplaceOffer'), 'Yes'), variables('marketplacePlan'), json('{\"offer\": \"No marketplace offer\"}'))]"
}
}
}