зеркало из https://github.com/Azure/ARO-RP.git
75 строки
3.4 KiB
JSON
75 строки
3.4 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"acrResourceId": {
|
|
"type": "string"
|
|
},
|
|
"fpServicePrincipalId": {
|
|
"type": "string"
|
|
},
|
|
"fullDeploy": {
|
|
"type": "bool",
|
|
"defaultValue": false
|
|
},
|
|
"rpServicePrincipalId": {
|
|
"type": "string"
|
|
},
|
|
"rpVersionStorageAccountName": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"name": "[concat(substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)), '/', '/Microsoft.Authorization/', guid(concat(parameters('acrResourceId'), parameters('rpServicePrincipalId'), 'RP / AcrPull')))]",
|
|
"type": "Microsoft.ContainerRegistry/registries/providers/roleAssignments",
|
|
"properties": {
|
|
"scope": "[resourceId('Microsoft.ContainerRegistry/registries', substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)))]",
|
|
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d')]",
|
|
"principalId": "[parameters('rpServicePrincipalId')]",
|
|
"principalType": "ServicePrincipal"
|
|
},
|
|
"condition": "[parameters('fullDeploy')]",
|
|
"apiVersion": "2018-09-01-preview"
|
|
},
|
|
{
|
|
"name": "[concat(substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)), '/', '/Microsoft.Authorization/', guid(concat(parameters('acrResourceId'), 'FP / ARO v4 ContainerRegistry Token Contributor')))]",
|
|
"type": "Microsoft.ContainerRegistry/registries/providers/roleAssignments",
|
|
"properties": {
|
|
"scope": "[resourceId('Microsoft.ContainerRegistry/registries', substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)))]",
|
|
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '48983534-3d06-4dcb-a566-08a694eb1279')]",
|
|
"principalId": "[parameters('fpServicePrincipalId')]",
|
|
"principalType": "ServicePrincipal"
|
|
},
|
|
"condition": "[parameters('fullDeploy')]",
|
|
"apiVersion": "2018-09-01-preview"
|
|
},
|
|
{
|
|
"sku": {
|
|
"name": "Standard_LRS"
|
|
},
|
|
"properties": {
|
|
"allowBlobPublicAccess": true
|
|
},
|
|
"location": "[resourceGroup().location]",
|
|
"name": "[parameters('rpVersionStorageAccountName')]",
|
|
"type": "Microsoft.Storage/storageAccounts",
|
|
"condition": "[parameters('fullDeploy')]",
|
|
"apiVersion": "2019-04-01"
|
|
},
|
|
{
|
|
"properties": {
|
|
"publicAccess": "Container",
|
|
"metadata": null
|
|
},
|
|
"name": "[concat(parameters('rpVersionStorageAccountName'), '/default/rpversion')]",
|
|
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
|
|
"condition": "[parameters('fullDeploy')]",
|
|
"apiVersion": "2019-04-01",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts', parameters('rpVersionStorageAccountName'))]"
|
|
]
|
|
}
|
|
]
|
|
}
|