ARO-RP/deploy/rp-production-global.json

138 строки
6.5 KiB
JSON

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"acrLocationOverride": {
"type": "string",
"defaultValue": ""
},
"acrResourceId": {
"type": "string"
},
"clusterParentDomainName": {
"type": "string"
},
"fpServicePrincipalId": {
"type": "string"
},
"gatewayServicePrincipalId": {
"type": "string"
},
"rpParentDomainName": {
"type": "string"
},
"rpServicePrincipalId": {
"type": "string"
},
"rpVersionStorageAccountName": {
"type": "string"
}
},
"resources": [
{
"sku": {
"name": "Premium"
},
"properties": {
"dataEndpointEnabled": true
},
"name": "[substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1))]",
"type": "Microsoft.ContainerRegistry/registries",
"location": "[if(equals(parameters('acrLocationOverride'), ''), resourceGroup().location, parameters('acrLocationOverride'))]",
"apiVersion": "2020-11-01-preview"
},
{
"properties": {},
"name": "[parameters('rpParentDomainName')]",
"type": "Microsoft.Network/dnsZones",
"location": "global",
"apiVersion": "2018-05-01"
},
{
"properties": {},
"name": "[parameters('clusterParentDomainName')]",
"type": "Microsoft.Network/dnsZones",
"location": "global",
"apiVersion": "2018-05-01"
},
{
"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"
},
"apiVersion": "2018-09-01-preview",
"dependsOn": [
"[resourceId('Microsoft.ContainerRegistry/registries', substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)))]"
]
},
{
"name": "[concat(substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)), '/', '/Microsoft.Authorization/', guid(concat(parameters('acrResourceId'), parameters('gatewayServicePrincipalId'), '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('gatewayServicePrincipalId')]",
"principalType": "ServicePrincipal"
},
"apiVersion": "2018-09-01-preview",
"dependsOn": [
"[resourceId('Microsoft.ContainerRegistry/registries', substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)))]"
]
},
{
"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"
},
"apiVersion": "2018-09-01-preview",
"dependsOn": [
"[resourceId('Microsoft.ContainerRegistry/registries', substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)))]"
]
},
{
"sku": {
"name": "Standard_LRS"
},
"properties": {
"allowBlobPublicAccess": true
},
"location": "[resourceGroup().location]",
"name": "[parameters('rpVersionStorageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-04-01"
},
{
"properties": {
"publicAccess": "Container",
"metadata": null
},
"name": "[concat(parameters('rpVersionStorageAccountName'), '/default/rpversion')]",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-04-01",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('rpVersionStorageAccountName'))]"
]
},
{
"properties": {
"publicAccess": "Container",
"metadata": null
},
"name": "[concat(parameters('rpVersionStorageAccountName'), '/default/ocpversions')]",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-04-01",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('rpVersionStorageAccountName'))]"
]
}
]
}